Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression problem with 'If' condition

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

  

CountryMonthNoSum(Value)If(Sum(Value)>0,Sum(Value),0)
AA11010
AA22020
AA88080
AA9-900
AATotal2020
BB3-300
BB44040
BB5-500
BBTotal-400
CC66060
CC77070
CCTotal130130
DD10100100
DD11110110
DD12-1200
DDTotal9090
Total 200200
1 Solution

Accepted Solutions
mohammadkhatimi
Partner - Specialist
Partner - Specialist

Hie..

EXPRESSION:-

sum(aggr(If(Sum(Value)>0,Sum(Value),0),Country,MonthNo))

PFA.

Regards,

Mohammad

View solution in original post

3 Replies
mohammadkhatimi
Partner - Specialist
Partner - Specialist

Hie..

EXPRESSION:-

sum(aggr(If(Sum(Value)>0,Sum(Value),0),Country,MonthNo))

PFA.

Regards,

Mohammad

danieloberbilli
Specialist II
Specialist II

use this expression:

sum(aggr(If(Sum(Value)>0,Sum(Value),0),Country,MonthNo))

Not applicable
Author

Hi,

Try out below expression. it should work.

=sum(If((Value)>0,(Value),0))

Regards,

Raksha