Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ArtemZadorozhnyi
Contributor II
Contributor II

Gradient color background in Pivot table

Hi! 
I'm looking for a way to apply gradient color in Qlik Sense:
1) in a pivot table based on the value (background color expression). The value is 0 to 1 (0 = green and 1 = red) with a transition point = 0.2 (it should be more red starting up from this point). 

2) same for bar chart.

I've been trying using RGB() function but can't adjust it to have the transition point at 0.2.

Thanks in advance! 

Labels (1)
1 Solution

Accepted Solutions
Antoine04
Partner - Creator III
Partner - Creator III

What if you adapt your expression like :

If( [Breakage %]<0.2, ColorMix1([Breakage %],GreenLight(),Green()), If( [Breakage %]>=0.2, ColorMix1([Breakage %],RedLight(),Red()) ))

Then that will be always green if <0.2 and always red if >=0.2

 

View solution in original post

4 Replies
Antoine04
Partner - Creator III
Partner - Creator III

Hello

You need to use the function ColorMix1() and/or ColorMix2()

Tell me if you need more help

Regards

ArtemZadorozhnyi
Contributor II
Contributor II
Author

Hi! Thanks for your reply.
Colormix1 does the job, but the transition point would be at 0.5 and I try to move it to 0.2, so chart like one below will have the color transition (gr->red) at 20% 

 

image.png

Antoine04
Partner - Creator III
Partner - Creator III

What if you adapt your expression like :

If( [Breakage %]<0.2, ColorMix1([Breakage %],GreenLight(),Green()), If( [Breakage %]>=0.2, ColorMix1([Breakage %],RedLight(),Red()) ))

Then that will be always green if <0.2 and always red if >=0.2

 

ArtemZadorozhnyi
Contributor II
Contributor II
Author

Thank you! I'll give it a try