
Re: Ask: Partial Sum in Pivot Table to Sum Expression with condition
Sudha E Jan 12, 2015 5:52 AM (in response to Teddy Hendryanto)
Hi Teddy,Here i have attached the sample qvw.hope this will satisfy your requirement.
Thanks

sg.qvw 148.2 K

Re: Ask: Partial Sum in Pivot Table to Sum Expression with condition
Teddy Hendryanto Jan 12, 2015 8:43 PM (in response to Sudha E)Hi Sudha,
Thanks for the help..
if I see from your file, you use straight table.
In my case, I can't get the valid value from partial sum in pivot table. (Pivot table > Properties > Presentation > Show Partial Sums)
For your information, I've tried RangeMax too, but it keep gives me zero value when I use Partial Sums in Pivot table.
Here, I've attached your file again with some additional changes.
Hope you can see that file, and you'll find the point what I meant.

sg_edit.qvw 149.5 K

Re: Ask: Partial Sum in Pivot Table to Sum Expression with condition
憲一 アシスト 小笠原 Jan 12, 2015 9:34 PM (in response to Teddy Hendryanto)How about this expression in pivot table?
sum(aggr(if(sum(F1F2)>0,sum(F1F2)),F1,F2))



Re: Ask: Partial Sum in Pivot Table to Sum Expression with condition
Navdeep Kumar Jan 12, 2015 9:33 PM (in response to Teddy Hendryanto)Hi,
PFA the app.

sg_edit.qvw 149.5 K

Re: Ask: Partial Sum in Pivot Table to Sum Expression with condition
Teddy Hendryanto Jan 12, 2015 10:32 PM (in response to Navdeep Kumar)Hi kogasawara and Navdeep Kumar,
Thanks for your help.
@kogasawara : I can't figure out with your expression. I think that expression is not suitable for my case.
@Navdeep Kumar:
as you can see, your expression works because there's no sum inside if condition. But in my case, i need to have sum expression inside if condition. e.g. : sum( if( sum(F1F2)>0, sum(F1F2), 0) )
however, this come out with a result in "error in expression".
This is what i'm facing right now :
=sum(if(F1F2>0,F1F2,0)) > result OK, but i need to have sum inside if condition.
=if(sum(F1F2)>0,sum(F1F2),0)) > it change the negative value to positive but it gives zero in total.
=sum( if( sum(F1F2)>0, sum(F1F2), 0) ) > I need this kind of expression, but qlikview read it as an error. This is what I actually need.
anyone can help?
thanks

Re: Ask: Partial Sum in Pivot Table to Sum Expression with condition
Navdeep Kumar Jan 12, 2015 10:50 PM (in response to Teddy Hendryanto)Hey,
can u attach your app.

