Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
heiko_schmidt
Contributor III
Contributor III

Coloring in Pivot Table with nested columns

Hello, I use a pivot table with 1 dimension and 1 measure in the rows and 2 dimensions for the columns.

The columns are Year and month.

So when i expand the years dimension i get all months for the expanded year. some kind of nesting...

Now i want to have a background color depending on the amount of the measures value for each year total.

So the color should only be visible when the years dimension is collapsed and i don´t see month values for this year.

 

Lets say the measure in 2021 is 5 for each month. I want to have a background color red when I collapse the years dimension and see that the measure for 2021 is above 50

best regards

 

Labels (1)
1 Solution

Accepted Solutions
NitinK7
Specialist
Specialist

Try like below

In your measure set background color exp- 

if(SecondaryDimensionality()=1,
if(sum(amount)>=10,green()))

 

NitinK7_0-1615205611542.png

 

View solution in original post

4 Replies
NitinK7
Specialist
Specialist

partially understood 

can you please explain with screenshots, I think that will be better to understand

heiko_schmidt
Contributor III
Contributor III
Author

sure, well this is my pivottable

heiko_schmidt_0-1615200503177.png

I want a background color for values bigger than 10 for the year 2021 and 2020.

when i expand the years this is what i see and then i don´t want a background color for each month.

heiko_schmidt_1-1615200741167.png

 

when i collapsethe dimension again and only see year the background color should be visible again.

NitinK7
Specialist
Specialist

Try like below

In your measure set background color exp- 

if(SecondaryDimensionality()=1,
if(sum(amount)>=10,green()))

 

NitinK7_0-1615205611542.png

 

heiko_schmidt
Contributor III
Contributor III
Author

Awesome. It´s working. Thank you so much