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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

aggregated value in pivot table total

Hello

I have an aggregated value on a higher lever dimension that should repeated on a lower level dimension, the total should not be the sum of the  repeated value but rather the value itself.

the exemple is described bellow in the column expression 1 in the attached file

Thanks in advance for your help

1 Solution

Accepted Solutions
Not applicable
Author

Actually I have found the answer, if you ever meet this sort of requirement you need to adjust the expression using dimensionality Function in my case

if(Dimensionality()=1

  or Dimensionality()=0,   sum([field]),    [field])

Thank you very much for your answers

View solution in original post

6 Replies
Not applicable
Author

Try using Distinct...

Not applicable
Author

you mean  sum (distinct field)?

Not applicable
Author

Sorry distinct will not help you, attached app may help u ..

 

if

(RowNo()>=1,sum(Expression1),sum(TOTAL Expression1))

or

 

if

(RowNo()>=1,sum(Expression1),sum(DISTINCT Expression1))

Clever_Anjos
Employee
Employee

You can use a combination of

sum( TOTAL <Dim1,Dim2, <dim3>> value)

TOTAL = All records in table

<dim1> will return aggregate by dim1

<dim1,dim2> will return aggregate by dim1,dim2

vikasmahajan

Try


Aggr(distinct sum( TOTAL <Dim1,Dim2, <dim3>> value))



Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

Actually I have found the answer, if you ever meet this sort of requirement you need to adjust the expression using dimensionality Function in my case

if(Dimensionality()=1

  or Dimensionality()=0,   sum([field]),    [field])

Thank you very much for your answers