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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Background color for Dimension in Pivot Table

Hi Guys,

I am having pivot table in which there are two dimensions namely Associate Name and Flag. In the source data there are three flags mainly 'Y','P','N'. For this table I want only two flags i.e 'Y' and 'P'. For this I have edited the Associate Dimension as follows:

if(Flag<>N,Associate_Name) and suppressed Null values in properties of table.

I have three expressions,

Max(Start_Date)

Max(End_Date)

Demand_Name

I want to give background color to Associate name depending upon End_Date. I have dragged the Flag dimension to horizontalize it so that I can have two columns of flag and inside the column of each flag there are three expressions.

Below is the expression I am using for the background color.

if([Active (Y/N)]='Y',

(if(MaxWOOverallDate<=$(v42Day) and MaxWOOverallDate>$(v35day),Yellow(),

if(MaxWOOverallDate<=$(v35day) and MaxWOOverallDate>$(v28Day),RGB(255,194,0),

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

(if(MaxWOOverallDate<=$(v42Day) and MaxWOOverallDate>$(v35day),Yellow(),

if(MaxWOOverallDate<=$(v35day) and MaxWOOverallDate>$(v28Day),RGB(255,194,0),

if(MaxWOOverallDate<=$(v28Day) and (MaxWOOverallDate>=Today() or MaxWOOverallDate<Today()),LightRed(150))))),LightBlue())

MaxWOOverallDate is the date which is maximum End_Date for each employee.


Above coloring expression in working fine for those Associates who are having only flag of Y or both flag Y and P. It is not working for those Associates who are only having P flag. But If I select flag P from list box,correct color code has been applied to Associate Name. But when both Y and P flag are selected expression does not work fine.

4 Replies
Anonymous
Not applicable
Author

Hi Guys,

Need help on the above issue ASAP..

vikasmahajan

Hello ,

Don't mix color in your existing expression . Give simple expression without color,

For Color give serrate in background color .

See attached qvw

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sdmech81
Specialist
Specialist

Hi,

Is tht ([Active (Y/N)] contains 'P' values??

Or it should be Flag?

sachin

Anonymous
Not applicable
Author

Yes [Active (Y/N)] contains 'P' values as well as 'Y' Values.