Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
So the following expression of mine shows a 1 if the value is bigger than 0, and a 0 if not.
=if((sum(aggr(sum([Stk Adj Qty]),[SK Branch No])) + sum(aggr(sum([Inflow Qty]),[SK Branch No]))) > 0 , 1 ,0)
basically what it does it to check if the sum of Stk Adj Qty and Inflow Qty is bigger than 0 with branch as dimension
What I'd like to do is to sum all those 1's together to give me a total on the caption of the object, but it just wont work.
Any idea on what I'm doing wrong?
Thank you guys
Hi Stefan,
can you post your app please?
Andy
Hi,
Try to check result of following exp in yur app,
=sum(aggr(sum([Stk Adj Qty]),[SK Branch No])) also,
=sum(aggr(sum([Inflow Qty]),[SK Branch No])))
& see whether it is working properly or not else your exp looks correct...
=Sum(Aggr(if((sum(aggr(sum([Stk Adj Qty]),[SK Branch No])) + sum(aggr(sum([Inflow Qty]),[SK Branch No]))) > 0 , 1 ,0), <table dimensions>))
where <table dimensions> is a comma separated list of the table dimensions
HTH
Jonathan
or another alternative would be, if it is a straight table that you are using, is to use the QlikView inbuilt total mode. You can select Sum and it should sum the expression you had initially
=if((sum(aggr(sum([Stk Adj Qty]),[SK Branch No])) + sum(aggr(sum([Inflow Qty]),[SK Branch No]))) > 0 , 1 ,0)
I hope this helps.
Best,
Sunny
Stefan,
Try like this
=sum(if((sum(aggr(sum([Stk Adj Qty]),[SK Branch No])) + sum(aggr(sum([Inflow Qty]),[SK Branch No]))) > 0 , 1 ,0))
Best Regards
Shambhu B