I have a table like this in an excel spreadshhet:
Col1 | Col2 | Col3
-----------+-----------+-----------
A | X | 1
A | Y | 2
B | X | 3
B | Y | 4
B | Z | 5
I want to use the aggregation feature of the pivot table.
Using the typical SUM of VALUES aggregation, provided by Excel, I get:
Col1 | Col3
-----------+-----------
A | 3
B | 12
But I want to use a different aggregation function. I want to use something that does:
Square root of ( Sum of (Square(x)))
So that in the end I get the table:
Col1 | Col3
-----------+-----------
A | SQRT(5) <= Sqrt(1*1 + 2*2)
B | SQRT(50) <= Sqrt(3*3 + 4*4 + 5*5)
Is there ANY way (VBA, C++, assembly, whatever it takes) I can specify my own functions in the aggregation list?
NOTE: I KNOW HOW TO DO THIS IN A SHEET, DON’T BOTHER ANSWERING IF IT’S NOT ABOUT WRITING CUSTOM AGGREGATION FUNCTIONS FOR PIVOTTABLE
Its not possible to write a custom aggregation function for a standard pivot table. But you can probably do what you want using MDX… maybe an MDX expert would like to comment?