9 Replies Latest reply: Feb 20, 2012 3:04 PM by henricook RSS

    Pie Charts from Multiple Columns

      Hi all,

       

      I have 10 columns which have an 'hours' figure in them (as in hours of audio)

       

      I'd like to create a pie chart that shows the sum of all the rows in each column as a percentage but i'm struggling to achieve this! I have added all 10 columns as dimensions, but what should my expression be??

        • Pie Charts from Multiple Columns
          Stefan Wühl

          Not sure if I fully understand your table structure, could you post some lines of sample data togehter with your expected result?

           

          If I had a kind of crosstable with several fields containing the same type of data, I would start with a crosstable load (please check the help for crosstable load prefix) to convert the table into a straight table:

             

          Crosstable (Type, Hours) LOAD recno(), * INLINE [

          Audio, Video, News, Work

          2, 1, 3, 4

          0,2,3,1

          4,1,3,4

          ];

           

          Just used four fields to demonstrate...

           

          The create a pie chart with dimension Type and as expression

          sum(Hours)

           

          and check the relative option?