Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Francine
Partner
Partner

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
Partner

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?