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: 
0li5a3a
Creator III
Creator III

Set Analysis multiple condition issue

Hi there,

 

Can someone tell my what is wrong with the below set analysis expression ?

I have a Straight table and I am trying to use this expression to restrict the data 

If I use the below formula all the restriction before  Actual_End.RelativeMonth = {'0'}> + <WO_Actual_End_Date = {'-'} are ignored and I don't understand why.

Count({<Customer = {'ABC'}, [Ticket Category] = {'Incident'}, Created.RelativeMonth -= {'0'}, Actual_End.RelativeMonth = {'0'}> + <WO_Actual_End_Date = {'-'} >} WO_Created_Date)

The logic is:

if Customer = ABC and Ticket Category = Incident and Created Month is NOT Current Month( I take this from Calendar) and The End date is Current month or End Date field is " - ", count the WO_Created_Date.

Thanks in advance

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

May be try this

Count({<Customer = {'ABC'}, [Ticket Category] = {'Incident'}, Created.RelativeMonth -= {'0'}>*(<End.RelativeMonth = {'0'}> + <End_Date = {'-'}>)}Created_Date)

or this

Count({<Customer = {'ABC'}, [Ticket Category] = {'Incident'}, Created.RelativeMonth -= {'0'}, End.RelativeMonth = {'0'}> + <Customer = {'ABC'}, [Ticket Category] = {'Incident'}, Created.RelativeMonth -= {'0'}, End_Date = {'-'}>}Created_Date)

View solution in original post

5 Replies
sunny_talwar

It might be easy to resolve if you are able to share a sample for us to see.

0li5a3a
Creator III
Creator III
Author

Sorry but I can't copy and paste the code from my app.

I don't understand how to use "OR" in set analysis 

I have found something like End.RelativeMonth = {'0'}> + <End_Date = {'-'}  but if I put this condition all the other condition are not counted.

Count({<Customer = {'ABC'}, [Ticket Category] = {'Incident'}, Created.RelativeMonth -= {'0'}, End.RelativeMonth = {'0'}> + <End_Date = {'-'} >}Created_Date)

Created.RelativeMonth is a new field based on the master calendar and aso End.RelativeMonth.  

End_Date and Created Date are the fields which I use to create the masters calendars.

sunny_talwar

May be try this

Count({<Customer = {'ABC'}, [Ticket Category] = {'Incident'}, Created.RelativeMonth -= {'0'}>*(<End.RelativeMonth = {'0'}> + <End_Date = {'-'}>)}Created_Date)

or this

Count({<Customer = {'ABC'}, [Ticket Category] = {'Incident'}, Created.RelativeMonth -= {'0'}, End.RelativeMonth = {'0'}> + <Customer = {'ABC'}, [Ticket Category] = {'Incident'}, Created.RelativeMonth -= {'0'}, End_Date = {'-'}>}Created_Date)
0li5a3a
Creator III
Creator III
Author

many thanks! all good now 🙂
mgajja2019
Contributor
Contributor

Just testing the discussion board