Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Subtotal Incorrect in pivot table

Hello,

I have change the position 1 value in the budget, that´s work fine, but the problem is that the new subtotal don´t show the real value. (Its not doing anything). 114506 was in the "So" position.

I attached an image for better visualization.

If(if(seg='Al',zo,if(se = 'Ju',Pa,Agr2))= 'S'

And if(seg='Al'or seg='So',Loc,if(seg = 'Ju',LoJuPa)) = 'C',0,

If(if(seg='Al',zo,if(seg = 'Ju',Pa,Agr2))= 'C'

And if(seg='Al'or seg='So',Loc,if(seg = 'Ju',LoJuPa)) = 'C',

Sum(Aggr(sum(plan),Loc)),

num(

RangeSum(sum(if(idPer=1,plan*1.19)/Mol),sum(if(idPer=2, plan/1.19)))*$(xUfMaxMes)

,if(Vis='UF','#.##0,0000' ,'#.##0'))))

Thanks!

1 Solution

Accepted Solutions
pgalvezt
Specialist
Specialist
Author

I got it. the solution was to add sum aggr around the whole IF:


Sum(Aggr(

If(if(seg='Al',zo,if(se = 'Ju',Pa,Agr2))= 'S'

And if(seg='Al'or seg='So',Loc,if(seg = 'Ju',LoJuPa)) = 'C',0,

If(if(seg='Al',zo,if(seg = 'Ju',Pa,Agr2))= 'C'

And if(seg='Al'or seg='So',Loc,if(seg = 'Ju',LoJuPa)) = 'C',

Sum(Aggr(sum(plan),Loc)),

num(

RangeSum(sum(if(idPer=1,plan*1.19)/Mol),sum(if(idPer=2, plan/1.19)))*$(xUfMaxMes)

,if(Vis='UF','#.##0,0000' ,'#.##0')))),Loc,Agr2))

View solution in original post

2 Replies
balabhaskarqlik

may be:

Sum(aggr(distinct sum(plan),loc))

pgalvezt
Specialist
Specialist
Author

I got it. the solution was to add sum aggr around the whole IF:


Sum(Aggr(

If(if(seg='Al',zo,if(se = 'Ju',Pa,Agr2))= 'S'

And if(seg='Al'or seg='So',Loc,if(seg = 'Ju',LoJuPa)) = 'C',0,

If(if(seg='Al',zo,if(seg = 'Ju',Pa,Agr2))= 'C'

And if(seg='Al'or seg='So',Loc,if(seg = 'Ju',LoJuPa)) = 'C',

Sum(Aggr(sum(plan),Loc)),

num(

RangeSum(sum(if(idPer=1,plan*1.19)/Mol),sum(if(idPer=2, plan/1.19)))*$(xUfMaxMes)

,if(Vis='UF','#.##0,0000' ,'#.##0')))),Loc,Agr2))