Discussion Board for collaboration on QlikView Layout & Visualizations.
I have a pivot with three dimensions Version, Quarter and Month and a conditional expression as seen in gray areas they are actually calculated with below expression.
Is it possible to correct partial sums highligted red below? Any solution or suggestion is very helpful
if(sum(QUANTITY)>0, sum(QUANTITY), if(match(VERSION,'M1','M2')>0, RangeSum(Below(sum(QUANTITY),1,2))))
There are always six Versions and version order is fixed. If VERSION is 'M1' or 'M2' we get the Actuals value in to the cell and it is confusing the row total.
I attached the example qlikview application for problem with partial sums in the pivot.
Go to Solution.
I think there is no simple (even not possible) solution with pivot .
So far only solution to correct pivot sub totals is to introduce new records to the fact table within script.
Basically the copying QUANTITY logic is handled as below: Now different sum expressions works and sub totals are correct in the pivot.
*********** code from script ***************
LOAD if(VERSION='-', null(), Dual(VERSION,ORDER)) AS VERSION, QUARTER, MONTH, QUANTITYFROM version_quantities.xls(biff, embedded labels);NEW:NoConcatenateLOAD dual('M2',5) AS VERSION, VERSION AS ORIG_VERSION, QUARTER, MONTH, QUANTITYResident FACTWhere VERSION = 'Actuals'and month(QuarterEnd(MONTH)) <> Month(MONTH);Concatenate(NEW)LOAD dual('M1',4) AS VERSION, VERSION AS ORIG_VERSION, QUARTER, MONTH, QUANTITYResident FACTWhere VERSION = 'Actuals'and month(QuarterStart(MONTH)) = Month(MONTH);Concatenate(FACT)LOAD * Resident NEW;drop Table NEW;
No reply no suggestion ..
so it is not possible :-) ?
I like to follow your post. No reply because yr expression is complicated.
I hv post few of these questions also not able get any reply.
Thanks pauly I had provided example for this hopefully someone come up with some suggestion