Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Doubt with if analysis

Hello everybody

I'm returning to develop after a long time so i have an easy question

I'm doing this

IF( SUM(A) <> 0 , SUM(B))

This works but in the pivot table when i collapse the '<> 0' doesn't work and the sum isn't correct

Thanks, Greetings.

5 Replies
sunny_talwar

The overall Sum is not correct or the line level sum isn't matching? May be you need to add Sum(Aggr()) function in there

Not applicable
Author

ans1.PNG

Have you tried total mode to be expression total in expressions tab? 

Not applicable
Author

The sum is OK. The total isn't working

 

Prd_Desc_GroupPrd_Mat_Group_ExtBudgetItems% Var
Total 23092010.148.433.8874294.78%
CornTotal 265002924781003.69%
1600030699411.65%
2710020250185.21%
374003785-48.85%
4600026525342.08%

What do you think i should do?

I tried aggr like with the two dimmensions but i don't see the total. What do you suggest with the aggr?

Not applicable
Author

i can't do that with pivot table.

sunny_talwar

Did you try like this?

Sum(Aggr(If(Sum(A) <> 0 , Sum(B)), Prd_Desc_Group, Prd_Mat_Group_Ext))