Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

TOTAL of IF statement and variable in straight table

Hello Community!

I tried to find a solution in existing discussions but were not successful.


I have this expression in a straight table to calculate New Freight:


if(vSaleSize<(sum([SaleAmount])),[Freight]=0,[Freight])


vSaleSize is my variable.

But when I sum this expression , it returns 0 in Total.

Qlikview.png

Can you help me please on that point.

Best regards,

David

1 Solution

Accepted Solutions
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Try setting the Total Mode of your expression to Sum Of Rows

View solution in original post

4 Replies
its_anandrjs

Hi,

Try this

if(vSaleSize<(sum([SaleAmount])), 0 ,[Freight])


Or what is the definition of the vSaleSize variable.


Or


if(vSaleSize < (sum(TOTAL [SaleAmount])), 0 ,[Freight])


Regards,

Anand

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Try setting the Total Mode of your expression to Sum Of Rows

Not applicable
Author

Thank you so much Marcus.

I never think about this option.

Best regards,

David

Not applicable
Author

Thank you for your help Anand.

Have a nice day,

Best,

David