Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
g23
Contributor III
Contributor III

Background color in Pivot Table based on condition

Dear Qlik community,

I have 4 fields in a pivot table - Year, sx, sum(A) as A and sum(B) as B.

This is the table:

g23_0-1600070935870.png

 

Is it possible to color the background of A and B when for each year sum(A) > sum(B)?

For example I'd like add color on the following row of the table:

g23_1-1600071643019.png

Is it possible? If it is how can I do so? 

thanks

1 Reply
tommyl
Creator
Creator

Hello,

You should write the "background color expression" part in the measure this:

if(sum(a)>sum(b), RGB(0,0,255))

If you will to implement this solution, you should write this expression to column A and column B "background color expression" part both. 

Regards,

Tommy.