Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Shiva123
Creator
Creator

Totals on pivot

hi,

      everybody i am trying to get to totals on pivot table, i enabled partial sum but still it is not displaying, but it is displaying when i convert it to straight table and i even tried the aggr function with all the  dimensions in the expression due to complexity of the expression the dashboard is hanging up i even tried creating the pivot table from scratch it is not working.   So what could be the best way to get totals .

Thanks in advance

13 Replies
Anil_Babu_Samineni

Please show the expression?

Sum(Aggr(your expression, Dim1, Dim2..))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Shiva123
Creator
Creator
Author

thanks anil i did that , that hangs up my dashboard due to complexity of expression ( nested if ).

thanks

sunny_talwar

Can you share how the expression looks like?

Shiva123
Creator
Creator
Author

hi sunny attached is the screen shot of the expression

sunny_talwar

This expression can be drastically simplified for 2 reasons...

1) You can probably avoid using Aggr(NODISTINCT, Month, Period_YYYY) using TOTAL <Month, Period_YYYY>

2) You are using the same Aggr() every time, which means you can use an overarching Aggr() instead of repeating it 100 times

Shiva123
Creator
Creator
Author

hi sunny my concern is as  the expression is running through a loop  will the total function do the same as aggr(no distinct and one more thing  is there any chances that this could be a bug in qlik ?.

thanks

sunny_talwar

Aggr(NoDISTINCT ... ) is not exactly the same thing as TOTAL... but Aggr(NODISTINCT ....) can very often be replaced with TOTAL Qualifier.... In your case, I cannot guarantee it will work... but if it does... you will see a lot of performance imporvement

I am not sure what are you referring to as a bug?

Shiva123
Creator
Creator
Author

i am referring to the totals on pivot .Because i was able to get totals on one of the pivot table where as i am not able to get  here

sunny_talwar

I don't think that this is a bug... I think this is by design... you can overcome your problem by using a straight table and selecting 'Sum of Rows' and I think that should fix your problem... but I am not sure if I can guide you in fixing this in pivot table...

You can try...

Sum(Aggr(Your Expression, YourDimensions))