Skip to main content

Hello all - I have the workbook (sheet 9) that calculates the percentage difference of the previous month. I would like the month value to be red if there is an increase from the last month, green if there is a decrease, or black if no change.

 

This video here https://www.youtube.com/watch?v=_VTg_zPP3S8 at the 23:42 mark shows me that it's possible but it doesn't go into the detail that I need to see how it can be done.

 

If anyone can point me to an article, example, video or provide me a workbook with the detail so I can study it, I would really appreciate it.

 

Thanks

11 answers
  1. Jun 13, 2021, 6:23 AM

    I dragged your table calculation to the data pane and named it [_Percent Change]. Then I created a calculation named [_Flag with Color]

    //Flag with Color

    //The last ELSEIF could be changed to ELSE and the 'Error' eliminated

    IF [_Percent Change]<0 THEN 'Green'

    ELSEIF [_Percent Change]=0 THEN 'Black'

    ELSEIF [_Percent Change]>0 THEN 'Red'

    ELSE 'Error'

    END

    Place this calculation on the Color mark and edit colors to match ones desired. You can only change a color value if it is present in the worksheet. I cycled through the parameter to see if a 0 happened to exist. It doesn't appear to do anything. Do you have the parameter connected to something?

0/9000