Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey all,
a question regarding changing the colour of the text in a table. I have a complex master measure including several set analysis conditions. I have a variable which represents the title of the master measure.
So variable1: 'Difference # '&Max(Year)&' - '&Max(Year-1)
In the master measure the label expression is: =$(variable1)
In the table everything works fine, the master measure calculates correctly and the label adapts properly. Now I want to colour the values when they are above 0 green and below red.
So my text color expression the table is:
if($(variable1)>0),green(),red())
And I also tried:
if([$(variable1)]>0),green(),red())
Sadly this doesn't seem to reference the label and therefore doesn't color anything. I cannot use the Column(ColumnNo) option because of hidden and changing columns. The above seemed like a solid option.
Is there anyway to give visual cues based on the outcomes of the master measure?
Thanks
Hi Barry,
Maybe you can try this way.
if($(variable1)< 0, 'red', Green()) or if(($(variable1))< 0, 'red', Green())
regards,
Hey,
thanks for your suggestion. I tried this, but it doesn't get the desired result.
Basically what I want is an excel like conditional formatting. Above 0 is green and below 0 is red.
Thanks
If you want me to help you trying other ways please share some data with me.
regards,
Hi,
In Qlik Sense you can not refer an expression name within other expression.
So in your case you can not use the Expression Label in Color expression.
For this, you need to write entire expression in if condition.
Regards,
Kaushik Solanki