Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am facing problem to write simple expression in qlikview with 'If Condition'.
Fist expression is fine bt second expression partial sum total is wrong.
I marked with red color.
And I am attaching the excel file and qv application also.
Please give me a solution. Thanks in advance
Country | MonthNo | Sum(Value) | If(Sum(Value)>0,Sum(Value),0) |
AA | 1 | 10 | 10 |
AA | 2 | 20 | 20 |
AA | 8 | 80 | 80 |
AA | 9 | -90 | 0 |
AA | Total | 20 | 20 |
BB | 3 | -30 | 0 |
BB | 4 | 40 | 40 |
BB | 5 | -50 | 0 |
BB | Total | -40 | 0 |
CC | 6 | 60 | 60 |
CC | 7 | 70 | 70 |
CC | Total | 130 | 130 |
DD | 10 | 100 | 100 |
DD | 11 | 110 | 110 |
DD | 12 | -120 | 0 |
DD | Total | 90 | 90 |
Total | 200 | 200 |
Hie..
EXPRESSION:-
sum(aggr(If(Sum(Value)>0,Sum(Value),0),Country,MonthNo))
PFA.
Regards,
Mohammad
Hie..
EXPRESSION:-
sum(aggr(If(Sum(Value)>0,Sum(Value),0),Country,MonthNo))
PFA.
Regards,
Mohammad
use this expression:
sum(aggr(If(Sum(Value)>0,Sum(Value),0),Country,MonthNo))
Hi,
Try out below expression. it should work.
=sum(If((Value)>0,(Value),0))
Regards,
Raksha