Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have below fields in my table
Company Name,
Day,
Weekenddate,
Amount.
I need to create a pivot table as shown in attachment, the challenge here for me is for horizontal values i need to show Average and for vertical values need to show sum.
Note: The calculations may not correct in attachment.
I have tried with below expression
Alt(Avg(Aggr(sum(Amount),[Company Name],Day,Weekenddate)),0)
Please help to get the result. Thanks for your time.
You should be able to do this using Dimensionality() and SecondaryDimensionality() functions
The second dimension... or how to use secondarydimensionality()
Thanks for quick response sunny, i have seen those useful threads.
Still in confusion what will be the expression, if i take SUM, then both horizontal and vertical values are coming as SUM, same case with Avg. Unfortunately i need to handle both cases.
It will be fast if you can provide a sample, but the idea is to do something like this
If(Dimensionality() = 1 and SecondaryDimensionality() = 0, then1expression,
If(Dimensionality() = 0 and SecondaryDimensionality() = 1, then2expression, else3expression))