Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a problem with partial sum. Say I have a dimention 1 call D1 and have two values: a,b. and I have one expression E whose value will depend on D1 value,for example:
if(D1='a',Sum(cost),if(D1='b',Sum(cost)*100,?????))
The partial sum will be incorrect. How to script the ???? part so that the partial sum will correct.
Thanks!
Dihui
If using a straight table, Look at using the "Sum of Rows" as the expression total instead of the Expression Default.
If using a pivot table, look up the chapter.. think it's 24.3 in the QV Reference manual regarding Sum of Rows in pivot table.
Hi,
Instead of ???? you can put 0. This will not effect on your partial sum.
Hope this will help you.
Regards,
Kaushik Solanki
Hi Johannes,
Still do not find the solution. I am using pivot table. Maybe we read different manuals.....
-dihui
Try This:
Sum(if(D1='a',cost,if(D1='b',cost*100)))
Thanks Erika,
It works
Hi Dihui,
Attached is a sample QVW... I included both method (Erika and Johannes)
The solution can be found in the QlikView 10 manual page 1362 (pdf page)
Hi khim_hoe,
very cool, thanks very much!
-Dihui