Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Statements in Set Analysis

Is it possible to have a conditional If statement in a Set Analysis Expression?

This is my set analysis,

sum({Revenue_Pro} Order__c.Total_Order_Amount2__c)

but I also need to say that if(probability>70 and <100,sum Total_order_Amount)

Thanx

9 Replies
erichshiino
Partner - Master
Partner - Master

Hi, Is probability a field?

If it is you can write something like:

sum( {<probability = {'>70<100'}>} Total_order_Amount)

Why do you have {Revenue_Pro} on your original set analysis?

--

Regards,

Erich

Not applicable
Author

Yes Probability is a field. The reason the previous set analysis had Rev_Pro is because I was originally going to use a bookmark, but it failed.

So is there a way to combine the

sum({ $<Order__c.AppforBooking_MonthYear={[05-2011]}>} Products_OTR__c.Total_Price__c) and

sum( {<probability = {'>70<100'}>} Total_order_Amount)

into a single state or do they need to be seperate?

erichshiino
Partner - Master
Partner - Master

if I understood you correctly, you can use it like this:

sum({ $<Order__c.AppforBooking_MonthYear={[05-2011] , probability={'>70<100'}}>} Products_OTR__c.Total_Price__c)

( did the answer at http://community.qlik.com/thread/28300 work for you?)

Not applicable
Author

There seems to be a syntax issue with the "=" after prbability....any idea what would cause that?

erichshiino
Partner - Master
Partner - Master

I've seen problems with the syntax checker on QV 10. Not sure if this is your case? Did it give you the right results?

Not applicable
Author

Unfortunately, due to the syntax, id returns nulls....

erichshiino
Partner - Master
Partner - Master

I wrote an extra }  at the end and remove one in the middle...

Please, try this one:

sum({ $<Order__c.AppforBooking_MonthYear={[05-2011]}, probability={'>70<100'}>} Products_OTR__c.Total_Price__c)

Not applicable
Author

Thanx for trying...same issue with the "=" sign. It's giving me a syntax error on the equals

danielrozental
Master II
Master II

I believe it should be

sum({ $<Order__c.AppforBooking_MonthYear={'05-2011'}, probability={">70<100"}>} Products_OTR__c.Total_Price__c)

Please disregard what the syntax checker might say, it doesn't always gets it right.