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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Qliksense_77
Creator
Creator

Color gradient in pivot

Hi

I need to background color a pivot table with green if the measure is between 0.8 to 0.9. 

If the measure is not between 0.8 to 0.9 the backgrpund color should be red. 

And the tricky part is that the red color has to be gradient. The further the measure is from 0.8 to 0.9 the more dark red the background color has to be.

Anybody that can help ?

Labels (2)
1 Solution

Accepted Solutions
VBD
Partner - Creator II
Partner - Creator II

Hello, you can try something like that

IF(
Measure1 >= 0.8 AND Measure1 <= 0.9,
rgb(0, 255, 0), 
rgb(255, (1 - fabs(Measure1 - 0.85) * 10) * 255, (1 - fabs(Measure1 - 0.85) * 10) * 255) 
)

 

Regards,

Valentin Billaud
Next Decision

View solution in original post

2 Replies
VBD
Partner - Creator II
Partner - Creator II

Hello, you can try something like that

IF(
Measure1 >= 0.8 AND Measure1 <= 0.9,
rgb(0, 255, 0), 
rgb(255, (1 - fabs(Measure1 - 0.85) * 10) * 255, (1 - fabs(Measure1 - 0.85) * 10) * 255) 
)

 

Regards,

Valentin Billaud
Next Decision
Qliksense_77
Creator
Creator
Author

@VBD , thanks:)