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: 
curiousfellow
Specialist
Specialist

Partial sum of expression with if statement

I have a pivot table with one dimension and an expression with an if statement.

when I summarize these expression values with partial sum I get wrong results.

Do I have to add something to my expression ?

1 Solution

Accepted Solutions
sunny_talwar

Is this what you want?

Capture.PNG

Sum(Aggr(if(source='x',sum(value_x),0)+if(source='y',sum(value_y),0), source))

View solution in original post

3 Replies
sunny_talwar

Is this what you want?

Capture.PNG

Sum(Aggr(if(source='x',sum(value_x),0)+if(source='y',sum(value_y),0), source))

migueldelval
Specialist
Specialist

Hi Curiousfellow,

Try this example, please and tell me if it´s your requirement.

Regards

Miguel del Valle

curiousfellow
Specialist
Specialist
Author

This was not I was looking for, using Total gives wrong results.