3 Replies Latest reply: May 30, 2014 12:00 PM by Gysbert Wassenaar RSS

    Pie chart and Scripting

    Roman Spyridis

      Hi Guys!!

      I am not sure if I am posting in the correct section but I ll give it a try.

      I have a bit of a problem with a task I have been assigned to. I have to produce a pie chart with some values in it but I have problem with the scripting bit at the mo. basically I have an excel sheet with two extensive tables and I need to use the data from those tables to create the chart. The first table is called Priority and the second table is called Product Condition. (See image below)


      Now all the fields in these tables are associated with each other, hence we can have a Good product which can be Essential, Desirable or Nice to have. Same rule applies for the rest of the fields.

      My task is to create a pie chart which should include the total amount of Essential (the %), Desirable and Nice to Have as expressions. This is something i have managed to do. My problem is that i need to add 3 more expressions which should be number of Essential not equal to Good, number of Desirable not equal to Good and Nice to Have not equal to Good. Any ideas how to make that?????

      The scripting I’ve used for the first 3 Expressions is as follows.....  

      (100 * Count({$<[Priority] = {"Essential"}>} GeneralDock)/ Count({$<[Priority] = >} GeneralDock) )

      (100 * Count({$<[Priority] = {"Desirable"}>} GeneralDock)/ Count({$<[Priority] = >} GeneralDock) )

      (100 * Count({$<[Priority] = {"Nice to have"}>} GeneralDock)/ Count({$<[Priority] = >} GeneralDock) )

      The result of these scripts is shown in the image below




      Thanks in advance

        • Re: Pie chart and Scripting
          Bill Markham

          You need to add the extra condition [Product Condition] -= {"Good"} into your current expressions.  The minus before the equals is what give the not equal

          So you should get something like the below, I have just typed it freehand without testing so bear with me if it has typo.

          (100 * Count({$<[Priority] = {"Essential"} , [Product Condition] -= {"Good"}>} GeneralDock)/ Count({$<[Priority] = >} GeneralDock) )