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

Convert If condition in set analysis

Hi All,

I would like to convert the below if-else condition in set analysis.

sum(if(It.isAdj and It.QTY=0,0,It.Qty * It.factor))

I tried to convert as below using set analysis but it is not giving the result as the above expression gives. The set analysis I tried is:

sum({<It.isAdj = {0},It.QTY-= {0}>}It.Qty * It.factor)

This set analysis is giving the result equal to the below expression:

sum(if(not It.isAdj and It.QTY> 0,It.Qty * It.factor))

So I need to convert this sum(if(It.isAdj and It.QTY=0,0,It.Qty * It.factor)) expression to set analysis where both should give me the same result.

Can anyone help me in this?

Thanks,

Leni Balakrishnan

11 Replies
Not applicable
Author

Hi Leni,

Alternate States Available only  from Qlikview 11 Onwards..

Go to Document Properties -->General--> Alternate states->Click On It-->Click on Add->Enter Statename(Some String) State1-> Ok  Like that Create Two states..

Go To Object Properties..Provide Statename to All the Objects which U want filters for First chart

Do the Same for Second Chart And You can Make Selections for charts you are showing...

Otherwise You Can Detach the Chart from Dashboard Right Click on chart and Click On Detach the Chart.. This Also does not effect the Selection of Filters into Chart.

May be It is perfect for Ur Problem..

If U want to check How Alternate States work ...In Qlikview 11 Developer-->Open Whats new in Qlikview11 Dashboard..

Product Grouping Tab..

May be It will not be What r u looking for.. It will help to Achieve it....

Check Out This Vedio  Comparative Analysis - YouTube

And PFA.  I hope  It Helps...

Anonymous
Not applicable
Author

Thanks for your suggestion. It worked

Thanks a lot.

and I tried as below and this also achieved my requirement.

sum({<ct.cust_name=>}if(it.isAdj and it.QTY=0,0,it.Qty * it.Factor))