Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

convert if to set analysis

hi,

I need to convert my expressions based on if-condition:

=Count(DISTINCT if(Oppo_CreatedDate>= MonthStart([Datedopportunite]) and Oppo_CreatedDate<= MonthEnd([Datedopportunite])and IsNull(Oppo_Closed) , OpportunityCD))

=Count(DISTINCT if(Oppo_CreatedDate>= MonthStart([Datedopportunite]) and Oppo_CreatedDate<= MonthEnd([Datedopportunite])

and IsNull(Oppo_Closed) , OpportunityCD))

To a set analysis !!!

thanks

5 Replies
Not applicable
Author

Hi Hilal,

Try the below expression:

=count({<Oppo_CreatedDate = {">= $(=MonthStart(Datedopportunite)) <= $(=MonthEnd(Datedopportunite))"}, Oppo_Closed = {''}>} OpportunityCD)

MayilVahanan

Hi

Try like this

=count({<Oppo_CreatedDate = {">= $(=MonthStart(Datedopportunite)) <= $(=MonthEnd(Datedopportunite))"}, Oppo_Closed -= {'*'}>} Distinct OpportunityCD)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
danielact
Partner - Creator III
Partner - Creator III

Try this:

=Count(DISTINCT {$<Oppo_CreatedDate={'=Oppo_CreatedDate>= MonthStart([Datedopportunite]) and Oppo_CreatedDate<= MonthEnd([Datedopportunite])'}, Oppo_Closed={'=IsNull(Oppo_Closed)'}>} OpportunityCD)

Not applicable
Author

thanks for solutions but no one of these set analysis work, they return 0

danielact
Partner - Creator III
Partner - Creator III

Can you post a qvw so we can take a look at the dataset?