Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Saritha077
Contributor II
Contributor II

If condition with range

Hi All,
I am creating table with multiple fields i.e. dimensions and expressions
I want give conditional background color for measure, my measure is ratio

ratio values are like -5%,0%,3%,8%,10%.

my color condition is that like below : 

Saritha077_0-1733218970923.png

 

If(ratio < 3%, green(),

    If(ratio < 3% to 5% , yellow(),

          If(ratio > 5%, red()))

I am giving condition here

Saritha077_1-1733219181915.png

 

If i use above condition for color control it is not giving correct colors.

Please help me to get correct colors.

thanks in advance.

 

regards,

Saritha.

Labels (3)
1 Solution

Accepted Solutions
sbaro_bd
Creator III
Creator III

Hello @Saritha077 ,

Modify your expression like this : 

If(ratio <= 0.03, green(),

    If(ratio <= 0.05, yellow(),

          If(ratio > 0.05, red()))

Regards.

View solution in original post

2 Replies
sbaro_bd
Creator III
Creator III

Hello @Saritha077 ,

Modify your expression like this : 

If(ratio <= 0.03, green(),

    If(ratio <= 0.05, yellow(),

          If(ratio > 0.05, red()))

Regards.

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hi Saritha,

Use below expression:

If(ratio <= 0.03, green(),

    If(ratio <= 0.05, yellow(),

          If(ratio > 0.05, red()))

 

OR use master measure and set colors for threshold for reusability.

AshutoshBhumkar_0-1733221935580.png

Thanks,

Ashutosh