0 Replies Latest reply: May 4, 2017 5:59 PM by Mike Grattan RSS

    Color Expression in bar chart for alternative measure

    Mike Grattan

      I have a bar chart with a regular measure and an alternative measure.  I would like to color the bars based on the value of the selected measure. If the measure evaluates to a negative number (<0), then color it red, otherwise make it green.  This formula works for the primary measure:

       

      if($(vTotProfLoss) <= 0,Red(),Green())

       

      But if I expand this expression to also evaluate the alternative measure, it doesn't work.  I guess I need to find out if there's a way to tell which measure has been selected by the user, and then apply the correct color expression.

       

      Anyone have a suggestion as to how I can do this?

       

      Thanks!