Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Reply
Anil_Babu_Samineni
MVP
MVP

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