Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
vishalgoud
Creator III
Creator III

Help needed in set analysis

Hi All,

we have to implement the below where conditions in the set analysis.

where source_system='SR' and  source_objects not like '%MRP%' and source_objects like '%FOS%' and Transaction_Type<>'Post2Pre' and Flg_Partial_Churn=0

 

My set expression is :

Count({< Transaction_Type =- {"Post2Pre"}, Flg_Partial_Churn = {0},Source_Objects = {"FOS"},

Source_Objects =- {"MRP"},Source_Objects -= {"= index(Source_Objects,'MRP+FOS')>0"} >}Source_Subscription_Id)

 

There is a value in the source_objects column which is MRP+FOS which should be avoided. 

conditions : Source_Objects should include FOS and Avoid MRP and also should avoid FOS+MRP combinations as well.

 

Thanks much in advance.

 

Labels (1)
1 Reply
anthonyj
Creator III
Creator III

Hi @vishalgoud ,

Looks almost correct. The syntax for excluding a set is around the other way ("-=") and the "like" search option is with a "*".   Try like below:

count({$<source_system={'SR'}, source_objects-={"*MRP*", "*FOS*"}, Transaction_Type-={'Post2Pre'}, Flg_Partial_Churn={0}>}Source_Subscription_Id)

For reference, I go back to this PDF I found online. I have found it an invaluable resource.

https://ivan-shamaev.ru/wp-content/uploads/2014/08/Set_Analysis_pdf.pdf

I hope this helps.

Thanks

Anthony