1 Reply Latest reply: Sep 14, 2018 1:33 AM by Quy Nguyen RSS

    pie chart question

    zhen pan

      I have a table

      load *

      inline [

      id, sales, shipping, tax, discount 

      1, 100,2,5,-2

      2,120,10,7.2,0

      3,50,20,0,10

      ]

      if i want to categorize: sale in to taxable, and others in notaxable.

      how do I show them in a pie chart that I can drill down  the taxable and nontaxable to the lowest level or can it even  present in a table?

       

      thanks!

        • Re: pie chart question
          Quy Nguyen

          Try this script:

          Temp:
          CrossTable(TypeLv2,Value,1)
          load *
          inline [
          id, sales, shipping, tax, discount
          1, 100,2,5,-2
          2,120,10,7.2,0
          3,50,20,0,10
          ];
          FinalData:
          Load id,
          If(TypeLv2 = 'sales', 'Taxable','Notaxable') as TypeLv1,
              TypeLv2,
              Value
          Resident Temp;
          Drop Table Temp;
          

           

          Then create a drill-down dimension in your master items.

          Capture.PNG

          Create a pie chart:

          + Dimension: Your drilldown dimension

          + Measure: Sum(Value)