Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Pivot Table Formatting

Hi

I have been having issues when applying RAG formatting to a pivot table.

My table shows staff utilisation per month, and their respective teams.

The expression for the utilisation is as follows:

SUM([Billable AMS Time])/ SUM([Available AMS Time])*100


My Dimensions are Team, Person and Month(set horizontally)


When I have a filter on Month, and Department not expanded, the rule works as expected.


If I unfilter month, or expand Department, the rule appears for Department appears to use whatever value is in the top left cell for that Department.


See below:

Correct

correct.JPG



When I expand the department, however, it appears to take the top value for that department, as below:

incorrect1.JPG


If I remove the Month filter, I get a similar issue:

incorrect2.JPG



I would like the Department column's RAG to reflect the average of each person within that Department, and each Person's RAG to reflect their average across the three months.


Thanks in advance

1 Solution

Accepted Solutions
MVP
MVP

Re: Pivot Table Formatting

Try this:

=if(Aggr(NODISTINCT Avg(Aggr((SUM([Billable AMS Time])/ SUM([Available AMS Time])*100), Department, Resource, T_UploadMonth)), Department)<55, var_colour_RAG_Opaque_Red,

if(Aggr(NODISTINCT Avg(Aggr((SUM([Billable AMS Time])/ SUM([Available AMS Time])*100), Department, Resource, T_UploadMonth)), Department)>=70, var_colour_RAG_Opaque_Green,

var_colour_RAG_Opaque_Amber))

6 Replies
MVP
MVP

Re: Pivot Table Formatting

Would you be able to share a sample to test this out?

Not applicable

Re: Pivot Table Formatting

Certainly, find attached

Thanks

MVP
MVP

Re: Pivot Table Formatting

Can you check if this works for Department

=if(Aggr(Avg(Aggr((SUM([Billable AMS Time])/ SUM([Available AMS Time])*100), Department, Resource, T_UploadMonth)), Department)<55, var_colour_RAG_Opaque_Red,

if(Aggr(Avg(Aggr((SUM([Billable AMS Time])/ SUM([Available AMS Time])*100), Department, Resource, T_UploadMonth)), Department)>=70, var_colour_RAG_Opaque_Green,

var_colour_RAG_Opaque_Amber))

Capture.PNG

Not applicable

Re: Pivot Table Formatting

Thank you.

It appears to work when the month filter is on, but when the month filter is removed it appears to error, and colour everything amber.

incorrect3.JPG

Definite progress though

MVP
MVP

Re: Pivot Table Formatting

Try this:

=if(Aggr(NODISTINCT Avg(Aggr((SUM([Billable AMS Time])/ SUM([Available AMS Time])*100), Department, Resource, T_UploadMonth)), Department)<55, var_colour_RAG_Opaque_Red,

if(Aggr(NODISTINCT Avg(Aggr((SUM([Billable AMS Time])/ SUM([Available AMS Time])*100), Department, Resource, T_UploadMonth)), Department)>=70, var_colour_RAG_Opaque_Green,

var_colour_RAG_Opaque_Amber))

Not applicable

Re: Pivot Table Formatting

Thanks Sunny, this appears to be working well!!

Community Browser