Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ronman10
Creator
Creator

Background cell colour in a Pivot table with monthyear as dimension

Hello Guys,

 

I have a pivot table with 2 dimensions and 1 measure. One of the dimensions is monthyear and the other  is Customer. Now, what I want is the cell colour to appear based on the value of the previous cell (green if higher and red if lower) . Example: If, for customer A, Dec-19 sales is 100 and Nov-19 is 90, cell colour for Dec-19 should be in green and Nov-19 in red. I have data from 2015-2019. Please help me with this. 

Labels (3)
1 Solution

Accepted Solutions
y_grynechko
Creator III
Creator III

Hey,

like this?

 

Capture.PNG

 

Color expression on the measure: 

IF(Sum(Value) - BEFORE(Sum(Value)) < 0, red(),
IF(Sum(Value) - BEFORE(Sum(Value)) > 0,green(), white()))

View solution in original post

2 Replies
y_grynechko
Creator III
Creator III

Hey,

like this?

 

Capture.PNG

 

Color expression on the measure: 

IF(Sum(Value) - BEFORE(Sum(Value)) < 0, red(),
IF(Sum(Value) - BEFORE(Sum(Value)) > 0,green(), white()))

ronman10
Creator
Creator
Author

Thanks a lot.

Rony