Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mikegrattan
Specialist
Specialist

Color Expression in bar chart for alternative measure

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!

Labels (1)
0 Replies