Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total in Pivot Table

Hi,

Any idea how to create the pivot table as below?

pivot.PNG

If I used the partial sum in pivot table, it's give

pivot2.PNG

Another alternative way is create the Dimension2 as expressions, then drag down to left. These then need create all the tables for budget, LY and etc and hiding behind.

Disadvantage is user couldn't export whole table to excel.

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You could add 'Total' to Dimension 1:

Concatenate

LOAD 'Total' As Dimension1,

     ...

Autogenerate 1;

and then your expressions would need to say something like:

     If(Dimension1 = 'Total', Sum(Aggr(< your original expression >, Dimension1, Dimension2)), < your original expression >)

And finally, use custom cell formatting to bold the lines with Total. Or click the + next to the expression, and enter the text style expression:

     If(Dimension1 = 'Total', '<B>')

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
danieloberbilli
Specialist II
Specialist II

You could script the 'Total' as an additional value to the Dimension1 field by calculating the sums in a seperate logical table and then join it/ or use crosstable load to create the final table....but then there is no dynamic user selection on the dashboard possible...the Totals will be rather static.

Not applicable
Author

Please find the attached document

Not applicable
Author

Thanks. Need to think a way to create that column in backend. Alright, thanks.