Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
LoK
Contributor
Contributor

Gradient color in pivot table

Hello Community,

sorry for this basic question, but I have checked several other Community posts and videos and can't solve it.

I have a Pivot table and want to fill in a background color gradient to get this:

image.png

I already created the same matrix, only the colours are missing.

How can I add them? (light green to dark green)

Please find attached the App, i already tried it with a measure but it doesn't work.

Really appreciate your help.

Best LoK

Labels (2)
3 Replies
PrashantSangle

You have to write background color for each color code combination
something like
if(Count(distinct[OrderNumber])>0 and Count(distinct[OrderNumber])<100, RGB(100,10,10),RGB(255,12,120))

Regards,
Prashant Sangle
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
JordyWegman
Partner - Master
Partner - Master

Hi LoK,

Use this formula and paste in the ARGB codes your own codes:

ColorMix1 ((1+Sign(2*(Count(distinct[OrderNumber])-RangeMin (top(total 
Count(distinct[OrderNumber]),1,NoOfRows(total))))/(RangeMax (top(total 
Count(distinct[OrderNumber]),1,NoOfRows(total)))-RangeMin (top(total 
Count(distinct[OrderNumber]),1,NoOfRows(total))))-1)*Sqrt(Fabs((2*
(Count(distinct[OrderNumber])-RangeMin (top(total 
Count(distinct[OrderNumber]),1,NoOfRows(total))))/(RangeMax (top(total 
Count(distinct[OrderNumber]),1,NoOfRows(total)))-RangeMin (top(total 
Count(distinct[OrderNumber]),1,NoOfRows(total))))-1))))/2, ARGB(255, 0, 215, 0), ARGB(255, 0, 128, 0))

You can fill it in now, but the numbers are a little bit skewed so that gives a bit wrong colors.

Jordy

Climber

Work smarter, not harder
PrashantSangle

attaching sample qvf.

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂