Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
fgillen1
Contributor III
Contributor III

Pivot Table - Background Colour by Expression

Hi All,

I am trying to create a conditionally formatted pivot table. I am trying to use the colormix2 function in the Background color expression box to create the conditional formatting, however it is only throwing one color out.

ColorMix2((Count(DISTINCT {<status={'1'}>} UNIQUE_ID)/

Count(DISTINCT UNIQUE_ID)) , rgb(180,212,218), rgb(28,95,158))

Has anyone any ideas how I could modify this code in order to have 4 distinct colors based on the min to max values in the table?

qlik.JPG

Regards

Finbar

11 Replies
fgillen1
Contributor III
Contributor III
Author

Hi harish.insights,

That works to a point. It creates the background colour expression based on numbers are in that row.

Is there anyway the code can be changed so that it takes in consideration the full table?

Also do you know how to include the totals?

qlik.JPG

HarishG
Partner
Partner

Except the dimension, you can set background color including totals as well.

hope this helps,

Colormix1((EXPRESSION-$(=min(aggr( EXPRESSION, DIMENSION))))/$(=(max(aggr( EXPRESSION,DIMENSION))  -min(aggr( EXPRESSION, DIMENSION)))),white(),LightGreen())