Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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

Tags (3)
1 Solution

Accepted Solutions
Highlighted
Specialist III
Specialist III

Re: TOTAL of IF statement and variable in straight table

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

View solution in original post

4 Replies
Highlighted

Re: TOTAL of IF statement and variable in straight table

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

Highlighted
Specialist III
Specialist III

Re: TOTAL of IF statement and variable in straight table

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

View solution in original post

Highlighted
Not applicable

Re: TOTAL of IF statement and variable in straight table

Thank you so much Marcus.

I never think about this option.

Best regards,

David

Highlighted
Not applicable

Re: TOTAL of IF statement and variable in straight table

Thank you for your help Anand.

Have a nice day,

Best,

David