Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
laumartinezb
Contributor II
Contributor II

Pivot table background color with 3 conditions

Hi all!

I'm trying to define the background color for my pivot table. I want to use 3 colors depending on the following conditions:

- IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])>Expected,RGB(0,255,0))

- IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])<Expected and (Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])> Minimum,RGB(255,200,25))

- IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])<Minimum,RGB(255,0,0))

I would like to combine the three expressions in order to have all the conditions in the table, but I have only managed to use the second one.

laumartinezb_0-1589982909722.png

Thank you very much in advance!

Labels (1)
1 Solution

Accepted Solutions
fosuzuki
Partner - Specialist III
Partner - Specialist III

Try this:

IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])>Expected,RGB(0,255,0), IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])<Expected and (Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])> Minimum,RGB(255,200,25), IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])<Minimum,RGB(255,0,0))))

View solution in original post

2 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Try this:

IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])>Expected,RGB(0,255,0), IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])<Expected and (Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])> Minimum,RGB(255,200,25), IF((Sum([Total Tickets])-Sum([Total Breaches]))/Sum([Total Tickets])<Minimum,RGB(255,0,0))))

ArnadoSandoval
Specialist II
Specialist II

@laumartinezb 

You may found the suggestions given in this topic helpful Conditional colour formatting calculated measure/attribute 

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.