Announcements
cancel
Showing results for
Did you mean:
Partner - Creator II

How to put a expression as Dimension on Pivot Table

Hello Community,

I have a formula that's is very similar to the following:

=if(Dimensionality()=0,
sum(aggr(
sum(DISTINCT aggr(NODISTINCT sum(Field1),Field5,Field6))
/
sum(DISTINCT aggr(NODISTINCT sum(Field2),Field5,Field6))
*
(
sum(DISTINCT aggr(NODISTINCT sum(Field2),Field5,Field6))
/
sum(DISTINCT aggr(NODISTINCT sum(Field2),Field5,Field7))
)
,Field5,Field6)),

if(Dimensionality()=1,
sum(aggr(
sum(DISTINCT aggr(NODISTINCT sum(Field1),Field5,Field8,Field6))
/
sum(DISTINCT aggr(NODISTINCT sum(Field2),Field5,Field8,Field6))
*
(
sum(DISTINCT aggr(NODISTINCT sum(Field2),Field5,Field8,BasicUoMCode))
/
sum(DISTINCT aggr(NODISTINCT sum(Field2),Field5,Field8))
)
,Field5,Field8,Field6))
... and so on

Since Field 5 is a YearMonth field. And the result is the same in 12 months i only want have 1 column in Pivot Table. If i had this  expression it appears in all yearmonth columns, but i only want to see it 1 time and changing accordingly my dimensionality.

Anyone can help?

Best regards

Bruno Paulo