Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text format using valuelist

Hi,

I am using valuelist to create a dimension with 5 different calculated expressions in a straight table.  Valuelist(Actuial,Target,LY,vs Target,vs LY)

for the vsTarget and vs LY, I would like the text to change colour based on the calculated value.

I have tried an if statement in the text format of the expression but this doesn't seem to work

Assume you have to have the if(valuelist(...) = 'vs Target' then a nested if for the calculation if((Actual-Target)/Target > 0, RGB()

Please help!?

Thanks

Michelle

4 Replies
swuehl
MVP
MVP

Could you upload a small sample QVW that demonstrates your issue?

In your second if() statement, are Actual and Target field names or expression labels?

Not applicable
Author

Hi,

Attached

In the third column of the table I need the vs Target value to changed based on whether +ve or -ve

Hope this helps!

Cheers

Michelle

swuehl
MVP
MVP

Something like this should work:

=if(ValueList('Actual','Target','vs Target') = 'vs Target',

     If( ((sum(traffic)-sum(traffic_target))/sum(traffic_target))>0, LightGreen(), LightRed()

))



Not applicable
Author

Thank you!

Works perfectly