Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Background color for dimension in pivot table

I am having the pivot table as per the attachment .

I want to give the background color to Associate name. I have used Associate name and flag as dimension for chart. I have used expression for the coloring. But it working fine only for those associates for whom there is value for 'Y' flag. In excel sheet the expression is working fine for A but not for B.

I have used following expression for coloring:

if(([Active (Y/N)]='P' OR [Active (Y/N)]='Y') and (MaxPWODate<=$(v42Day) and MaxPWODate>$(v35day)),Yellow(),

if(([Active (Y/N)]='P' OR [Active (Y/N)]='Y')and (MaxPWODate<=$(v35day) and MaxPWODate>$(v28Day)),RGB(255,194,0),

if(([Active (Y/N)]='P' OR [Active (Y/N)]='Y') and (MaxPWODate<=$(v28Day) and MaxPWODate>=Today()),LightRed(150),

If(([Active (Y/N)]='P' OR [Active (Y/N)]='Y') and MaxPWODate<Today(),LightRed(150)))))

Please help me out guys asap.

4 Replies
MK9885
Master II
Master II

The attachment has nothing but a 2 rows and also the fields do not match the fields you using in the above expression.

Maybe you looking to format the cells?

If yes then check the below link

Changing font size in a specific column of a straight table

It will change color of specific column/dimension based upon the value.

Digvijay_Singh

Just check in case your variables are expanded properly or not, sometimes DD/MM/YYYY are calculated numerically when not enclosed in ,',.

qlikviewwizard
Master II
Master II

Are you getting the output for all the Date variables?

Anonymous
Not applicable
Author

Hi Arvind,

In the excel I have created the table which is same as that of the Qlikview Pivot table. In qlikview pivot table I have changed [Active (Y/N)] field to Flag. I have calculated MaxPWODate in the script.

The problem is When I select a single flag i.e Y and P, background color expression works perfectly but when I select both the flags, background color expression does not work perfectly.