4 Replies Latest reply on Dec 2, 2018 3:32 AM by Mark Trapani

    How can I create conditional formatting between dimensions and window average?

    Mark Trapani

      scrnshot.JPG

      I have the above plot and I would like to edit the marking colour for all circles falling in each of the 4 areas created from the average lines for the y and x axis.

       

      I tried conditional formatting and inserted the below script:

       

      if (([Home Runs])>WINDOW_AVG(AVG([Home Runs])) AND ([Batting Average])>WINDOW_AVG(AVG([Batting Average]))) then "Green" 

      elseif (([Home Runs])>WINDOW_AVG(AVG([Home Runs])) AND ([Batting Average])<WINDOW_AVG(AVG([Batting Average]))) then "Red"

      elseif (([Home Runs])<WINDOW_AVG(AVG([Home Runs])) AND ([Batting Average])>WINDOW_AVG(AVG([Batting Average]))) then "Yellow" 

      elseif (([Home Runs])<WINDOW_AVG(AVG([Home Runs])) AND ([Batting Average])<WINDOW_AVG(AVG([Batting Average]))) then "Blue" 

      end

       

      Could someone explain why the system is saying "cannot mix aggregate and non-aggregate arguments"? Would appreciate if anyone knows an efficient way to change the marking colours as explained above.