Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
dseelam
Contributor 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
Highlighted
vishsaggi
Esteemed Contributor III

Re: If Condition

Try this?

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

Capture.PNG

View solution in original post

18 Replies
Highlighted
lfholland
New Contributor III

Re: If Condition

It should go something like this:

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

Highlighted
dseelam
Contributor II

Re: If Condition

I need values in Straight table, Not working

Highlighted
lfholland
New Contributor III

Re: If Condition

Do you have a sample qvw you can share?

Highlighted
dseelam
Contributor II

Re: If Condition

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

Highlighted
vishsaggi
Esteemed Contributor III

Re: If Condition

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.

Highlighted
dseelam
Contributor II

Re: If Condition

Hello Vishwa,

It gave odd results

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

Highlighted
neelamsaroha157
Valued Contributor II

Re: If Condition

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.

Highlighted
vishsaggi
Esteemed Contributor III

Re: If Condition

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.

Highlighted
vishsaggi
Esteemed Contributor III

Re: If Condition

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