Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
dseelam
Creator II
Creator II

If Condition

Hello Folks,

How to use if condition around below expression, give me item where below expression value is equal to zero

sum((ACTUAL_COST)*SHIPPED_QUANTITY)

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Try this?

= sum({<ITEM = {"=Sum(ACTUAL_COST*SHIPPED_QUANTITY)=0"} >} ACTUAL_COST*SHIPPED_QUANTITY)

Capture.PNG

View solution in original post

18 Replies
lfholland
Creator
Creator

It should go something like this:

IF(sum((ACTUAL_COST)*SHIPPED_QUANTITY)=0,true expression, false expression)

dseelam
Creator II
Creator II
Author

I need values in Straight table, Not working

lfholland
Creator
Creator

Do you have a sample qvw you can share?

dseelam
Creator II
Creator II
Author

Sorry I dont have any sample QVW but you see below I want to show only rows with zero value

2018-08-13 10_40_00-colqlikviewtst - Remote Desktop Connection.png

vishsaggi
Champion III
Champion III

Try this?

sum(IF(ACTUAL_COST*SHIPPED_QUANTITY = 0, Fieldused1, 0)


Not sure which field you want to sum on so just mentioned some dummy name. Replace that with your actual fieldname.

dseelam
Creator II
Creator II
Author

Hello Vishwa,

It gave odd results

2018-08-13 11_34_36-colqlikviewtst - Remote Desktop Connection.png

neelamsaroha157
Specialist II
Specialist II

I don't think you should sum a dimension like ITEM_NUMBER. It would be easier to understand if you can provide a sample file with expected output.

vishsaggi
Champion III
Champion III

You cannot do a sum on your ItemNumber. Itemnumber is not a measure value right? may be you need count. Use count instead of Sum.

vishsaggi
Champion III
Champion III

Are you trying to count the number of items or you want sum(cost) ?