Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
brunopaulo
Partner - Creator II
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

1 Reply
Anil_Babu_Samineni

Image please?
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful