Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
ArtsJ
Contributor
Contributor

Background Color(change) in Pivot Table Columns - Comparing Year vs Year

Hi,

My reference table screenshot is attached, 

I need to color code 2022 vs. 2023 in each given criteria....e.g. if less Units in 2023 = should be red and likewise for other columns too.

QlikSense count (year split) as a one column = Units (in 000s) 

How can get the desired results,

Thanks for any insights here.

 

ArtsJB_0-1656103125602.png

 

Labels (1)
6 Replies
sidhiq91
Specialist II
Specialist II

@ArtsJ  You can use the below expression in Background color expression.

if(Sum(Units)>before(Sum(Units)),green(),red())

ArtsJ
Contributor
Contributor
Author

@sidhiq91 this code still makes everything in 2022 and 2023 background color red.

sidhiq91
Specialist II
Specialist II

@ArtsJ  Could you please provide a snapshot of what you are looking for? May be I will try to work on it for you.

ArtsJ
Contributor
Contributor
Author

I have the snapshot in my first message, but here it is again to elaborate on the issue I'm facing with the Pivot Table

ArtsJ_0-1656432677011.png

I need to Color Code FY23 in each given fields (columns) i.e. Units, % of Units, Ship vs. Start and 7 more fields.

Condition is -  if 2023 units < 2022 units ;  2023 Units, background color should be red,  green when 2023 units >2022 units, yellow 2023 Units =2022 Units.

Total (row) and, 2022 (columns) doesn't need to be color code? 

These fields are calculative, not coming out straight from the DB. Let me know if you need more inputs?

Thanks in advance to look into this.

ArtsJ
Contributor
Contributor
Author

Any suggestions please?

ArtsJ
Contributor
Contributor
Author

Does anyone know any solution or if QlikSense has any function that can support my request?