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: 
abeyphilip
Creator II
Creator II

Partial sum on Pivot

Hi,

Is there any way to achieve the following in qlikview. The problem here is, it requires one calculation logic for individual values and another when the partial sums are to be shown. The values for R and O are directly available per Desc, per (A/B/C) . P is to be calcualated as O * (1-R) and Q as O-P.

And for totals, O,P and Q are calculated by adding only the rows above it. But for R, it is to be calcualated as Q/P. Partial sum in pivot can work fine for O,P and Q  but not for R.

Any help would be greatly received..

Thanks,

Abey

Attaching the sample output.

1 Solution

Accepted Solutions
whiteline
Master II
Master II

There is a dimentionality() function that can be used to determine the level of calculation.

You can use something like this:

=if(dimentionality() = 2, R, Q/P)

View solution in original post

2 Replies
whiteline
Master II
Master II

There is a dimentionality() function that can be used to determine the level of calculation.

You can use something like this:

=if(dimentionality() = 2, R, Q/P)

abeyphilip
Creator II
Creator II
Author

Hi,

Brilliant. Worked perfectly. Thanks.

My actual model was different and had to consider other things as well, but key was using dimensionlaity.

Regards,

Abey.