Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
fheidenstecker
Partner - Creator II
Partner - Creator II

Conditional color for totals in Pivot Table

Hello Qlik Comnunity,

i have a question how to conditionally set the color of the totals in a Pivot table. I want to highlight the columns depending if the value is bigger or smaller than last years value.

I was able to access the Column using columnno()=0, and checking the year. But now i am stuck comparing the values for the years.

community.png

I attached a sample file....

Can anybody help?

Regards from Germany,
Fabian

2 Replies
sunny_talwar

This?

Capture.PNG

Expression:

=If(ColumnNo()=0,

If(Year=max(total Year),

If(Sum(Sales) > Sum(Aggr(Above(Sum(Sales)),Customer, Year)), Green(), Red())))

vishsaggi
Champion III
Champion III

Try this?

=

= IF(ColumnNo() = 0,

IF(Year = Max(Total Year),

IF( Sum( Total <Customer, Group> {< Year={ $(=max(Year))}>}Sales) > Sum(Total <Customer, Group> {< Year = {$(=Max(Year)-1)} >} Sales), Green(), Red())

))