Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with an expression

Hello

I have two expression columns in my report

1. sum[Book Amount]

2. sum([Sale Amount])

I want to write a condition in my first expression where if sum([Sale Amount]) is 0 then make sum([Book Amount]) as 0 so that I can suppress that rows by suppress zero values aand if its not 0 then give me the sale Amount.

Thanks

6 Replies
Anonymous
Not applicable
Author

Exactly as you say:

if(sum([Sale Amount])=0, 0, sum([Book Amount]))

Not applicable
Author

Exactly as you say:

Sum(If(sum([Sale Amount]) = 0,[Book Amount)]

anbu1984
Master III
Master III

=if(sum([Sale Amount]), sum([Book Amount]))

mohammadkhatimi
Partner - Specialist
Partner - Specialist

Hie Rizwan ,

Try this

if(sum([Sale Amount])=0, 0, sum([Book Amount]))


Regards,

Mohammad



CELAMBARASAN
Partner - Champion
Partner - Champion

Try this

Sum([Book Amount]) * RangeMin(1, Fabs(Sum([Sale Amount])))

praveenak
Partner - Contributor II
Partner - Contributor II

Can i ask for a sample qvw of your requirement? so that i can understand your basic requirement...

Coz I think the request u gave will base on the dependency of Sale Amount and Book Amount in some of my approaches.

If nothing like that dependency present, i suppose it can done with small scripts or QV in-built options.