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

AGGR function required for this pivot table?

Hi guys,

I have created a pivot table on a much larger scale but similar to below:

servicenameCW?01/07/1002/07/1003/07/1004/07/10
AW21:0020:00?19:4520:3021:4021:25
AX9590?60708080
AY9590?92888990
AZ9590?75798450


The calculations behind the figures are quite complex as they have to take into account whether the figures are numeric of time values, also some of the warning values can be greater or smaller than the critical value etc. There is a Red, Amber, Green (RAG) status. From this I would like to create a RAG % which shows the ratio of Green or Amber cells for each name. So for Name X, the RAG % = 100% as everything is green. I can create the calculation in a simple text box but when i try to import this into a pivot table it always seems to create a row, rather than a column. I tried using the AGGR function as demonstrated below but it still didn't work?

sum(aggr(if($(vKPIRAGMin) = 'G' or $(vKPIRAGMin) = 'A', 1, 0),
KPIBusinessDate))/
sum(aggr(if($(vKPIRAGMin) = 'R' or $(vKPIRAGMin) = 'A' or $(vKPIRAGMin) = 'G' , 1, 0),
KPIBusinessDate))


KPIRAGMin is a variable I use to determine whether the cell is R, A or G. KPIBusinessDate is simply the date at the top of the table.

If anyone has any suggestions as to how I could get the ratio/RAG% into the column where there is the ? it would be much appreciated.

Regards,

2 Replies
Not applicable
Author

Just a quick bump to this as I'm still having trouble getting the figures. Not sure whether to try a completely new approach or stick with my current method.

Thanks,

Not applicable
Author

Hi guys,

Anyone have any suggestions at all how to combat this problem? A separate table would suffice which would gave a percentage of the number of Green or Amber Cells across each name.

The calculation itself works when i select one individual name but doesn't work correctly when all of the names are selected so I think when nothing is selected it doesn't look at each name individually.

I really would appreciate any comments/suggestions.

Thanks,