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: 
ZoeM
Specialist
Specialist

Background Color Coding for a Calculated Dimension in a Pivot Chart

Community.

I am puzzled by my situation. 
I have a calculated dimension and I want the background colored based on the result of that calculated dimension. 

But it is only coloring a few of the available results in the table. 

My calculated dimension expression is:

=Aggr( Concat( {$<[Date Type]={'Start Dates'},Reference_Only={'No'}, [Declaration Status]={'Next'},Year=>} DISTINCT Rating),[MY Program])

My expression background color expression is:

=If(Aggr( Concat( {$<[Date Type]={'Start Dates'},Reference_Only={'No'}, [Declaration Status]={'Next'},Year=>} DISTINCT Rating),[MY Program])='G',RGB(146,208,80),


If(Aggr( Concat( {$<[Date Type]={'Start Dates'},Reference_Only={'No'}, [Declaration Status]={'Next'},Year=>} DISTINCT Rating),[MY Program])='Y',RGB(255,255,0),


If(Aggr( Concat( {$<[Date Type]={'Start Dates'},Reference_Only={'No'}, [Declaration Status]={'Next'},Year=>} DISTINCT Rating),[MY Program])='R',RGB(255,0,0))))

Has anybody else experienced this and what have you found as a solution?

Thanks. 

Labels (3)
31 Replies
sunny_talwar

Not sure why June 2021 was showing up... I just checked if there is any entry for it in the current selection using If(Sum(TOTAL <Date>1) >= 1... if 0, force the expression to be Null() and it went away.

 

ZoeM
Specialist
Specialist
Author

thanks Sunny!