Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I´ve created a pivot table in QlikView and would like to calculate the difference between the subtotals (see attached excel).
Any ideas how to define the expression in QlikView?
Thanks,
David
Use expression Colmn1 - Column2
hi,
add Dimensionality() as an extra expression .
if
(Dimensionality() > 0,
sum
( total col1) - sum(total col2)) .
Dimensionality() indicates the level of subtotals in pivot tables. For example, if you have a pivot table with dimensions A, B, C and D,
the expressions will have a dimensionality of 5
subtotals for D will have a dimensionality of 4
subtotals for C will have a dimensionality of 3
subtotals for B will have a dimensionality of 2
subtotals for A will have a dimensionality of 1
the grand total will have a dimensionality of 0
This allows you to tailor the expression to the return the correct value for the totals if you need something other than simple subtotals.
I´ve tried but it doesn´t work 😞