Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Francine
Partner - Contributor II
Partner - Contributor II

Color Expression for Progress Bar Indicator

Good morning,

I am attempting to color code a Progress Bar within a pivot table and have had some success but it's not fully functioning.  

The expression I am using is:

=if((sum([Obligations 4])/Sum([Budget 4])) >.30, green(), if((sum([Obligations 4])/Sum([Budget 4])) <.30, lightred(), if((sum([Obligations 4])/Sum([Budget 4])) =.58, yellow())))

This is returning the green and red - but not the yellow.  

Can anyone assist?  I can add more info if needed.

Thank you!

Francine

 

 

 

 

Labels (1)
3 Replies
Tanalex
Creator II
Creator II

Are you sure you have data the equals .58?   =.58

Francine
Partner - Contributor II
Partner - Contributor II
Author

Hello there - yes.  It should work with this expression, yes?  

Tanalex
Creator II
Creator II

The first issue is .58 is never evaluated because it is greater than .30.  = .58 never gets evaluated either. I suppose there is a rounding issue with the actual result versus a literal .58.  Try the code below and see if that is what you need.

=if((sum([Obligations 4])/Sum([Budget 4])) >=.58, yellow(),
if((sum([Obligations 4])/Sum([Budget 4])) >.30, green(),
if((sum([Obligations 4])/Sum([Budget 4])) <.30, lightred())))

One question is what if the result is .30?