Qlik Community

New to Qlik Sense

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

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JCC
Contributor
Contributor

Color expression based on percentage ranges

Hi everyone,

I wanna apply the below expression to color a column of values with different percentages. For example, below 50% the cells show in RED, between 50-80% in BEIGE, 80-100% in Turqoise and finally above 100% in Teal. However, my results had only two colors, RED and TEAL.

Could you please help me to check this expression and see what is wrong?

if([Filing Factor]>0.50, rgb(153,207,205), if([Filing Factor]>0.80, rgb(255,215,154), if([Filing Factor]>1.00, rgb(0,101,128), rgb(134,17,3))))

Thanks a lot!🤗

 

Labels (1)
1 Solution

Accepted Solutions
mruehl
Creator III
Creator III

The logic is simply not that what you wanted. the if-statements should be

if fillingfactor <0.5 then red else if fillingfactor>=0.5 AND filligfactor<0.8 the beige if fillingfactor>=0.8 AND filligfactor<1 then Turqoise.

so the whole range is covered from 0 to 1.

 

 

 

View solution in original post

2 Replies
mruehl
Creator III
Creator III

The logic is simply not that what you wanted. the if-statements should be

if fillingfactor <0.5 then red else if fillingfactor>=0.5 AND filligfactor<0.8 the beige if fillingfactor>=0.8 AND filligfactor<1 then Turqoise.

so the whole range is covered from 0 to 1.

 

 

 

JCC
Contributor
Contributor
Author

It works now ! great. Thanks a lot!