1 Reply Latest reply: Sep 11, 2015 6:24 AM by Gysbert Wassenaar RSS

    Bar Graph Dimension based on Calculated Percent of a Sum

      How do I make a bar graph dimension based on a calculated percent of a Sum?

      For example, if I have:


      Continent  Country  Medals  Attempts

      NorthAM    US          10         20

      NorthAM    Canada   5          5

      Europe       Spain      3          12

      Europe       France    3          6

      Asia            Russia   10        15


      I would like to show the number of CONTINENTS that have under 50% medals/attempts in red compared to under 75% in Yellow and over 75% green.


      In my example:

        NorthAm would be 15/25 = 60% (Yellow)

        Europe would be 6/18 = 33% (Red)

        Asia would be 10/15=66% (Yellow)


      So my bar graph should show:

        Yellow:  2

        Red:  1


      I've been playing with creating multiple expressions like this, with no luck:

         =COUNT(DISTINCT if(SUM(TOTAL <Continent> Medals)/SUM(TOTAL <Continent> Attempts)<.5,Continent))