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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table not sub totalling properly

Hello Everyone:

I have an issue where a sub total in a pivot table isn't calculating properly and I'm not sure how to fix my expression. I have a calculated dimension and in the expression I need to turn a negative number into a positive for one of the dimensions. I've done this with the following expression:

If([ACSEGVAL01] >= 41000 and [ACSEGVAL01] <= 46500,

money(sum({<Scenario={'Budget'}>} Amount)) * -1,

money(sum({<Scenario={'Budget'}>} Amount))

   )

If the "problem" dimension is expanded all the numbers are positive but the sub-total for this expression/dimension is still negative.

I'm not sure how to resolve this.

Thank you!

1 Solution

Accepted Solutions
Not applicable
Author

Try changing to this:

money(sum({<Scenario={'Budget'}>} Amount * If([ACSEGVAL01] >= 41000 and [ACSEGVAL01] <= 46500,-1,1)   ))

View solution in original post

2 Replies
jvitantonio
Specialist III
Specialist III

Can you attach yourapplication?

Not applicable
Author

Try changing to this:

money(sum({<Scenario={'Budget'}>} Amount * If([ACSEGVAL01] >= 41000 and [ACSEGVAL01] <= 46500,-1,1)   ))