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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ChristofZ
Contributor III
Contributor III

VizLib Pivot Table: Group Sum

hello,

I have a VizLib Pivot Table with a few Dimensions and Values - the Table is grouped by the A and/or B column, the table inserts Totals after each group.

I need to calculate the value of the totals by formula - so far I've tried things like aggr(sum(C), A, B) and sum(aggr(...)) and various combinations, sum({1} C), sum(all C), sum(total C),  etc etc.

RangeSum() doesn't help me either, because you can't ask it to sum the current group.

Any help would be greatly appreciated.

A B C
A1 B1 3
A1 B1 5
A1 B1 2
    Total 10
A2 B2 4
A2 B2 1
A2 B2 3
A2 B2 4
    Total12
1 Reply
ChristofZ
Contributor III
Contributor III
Author

ok - found it:

sum(Total <A, B> [C])

you really have to narrow it down giving all the dimensions of the group ("<A, B, ...>") you want to sum up column C in.

Thank you! 😎