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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
michael_knight
Post Prodigy
Post Prodigy

Distinct Count with multiple criterias

Hi,

 

I am trying to replicate the following below in Excel into Power BI. Basically I need to do an ALLEXCEPT of some sort with the Membership, check if the Worry Date is not blank and then if on any row the Mandatory is set to 'Yes' then return 'TRUE'

 

MembershipInterview DateMandatoryWorry DateResult
11102/12/2021No15/11/2021TRUE
11125/11/2021No15/11/2021TRUE
11123/11/2021Yes15/11/2021TRUE
11115/11/2021No15/11/2021TRUE
11109/11/2021No  
11102/11/2021No  
11129/10/2021No  
11122/10/2021No  
11115/10/2021No  
11107/10/2021No  
11130/09/2021No  
22223/09/2021No23/08/2021FALSE
22217/09/2021No23/08/2021FALSE
22206/09/2021No23/08/2021FALSE
22223/08/2021No23/08/2021FALSE
22223/08/2021No23/08/2021FALSE
22218/08/2021   
22209/08/2021   
22229/07/2021   
22219/07/2021   
22212/07/2021   
22209/07/2021   
22205/07/2021   
22202/07/2021   

 

Does anyone know how I can do this?

 

Thanks,

Mike

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @michael_knight ,

 

Please try:

Result = 
var _t=SUMMARIZE(FILTER('Table',[Membership]=EARLIER('Table'[Membership])&&  [Worry Date]<>BLANK()  &&[Worry Date]=EARLIER('Table'[Worry Date])),[Mandatory])
return  IF("Yes" in _t, TRUE(),FALSE())

Output:

Eyelyn9_0-1638856637585.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @michael_knight ,

 

Please try:

Result = 
var _t=SUMMARIZE(FILTER('Table',[Membership]=EARLIER('Table'[Membership])&&  [Worry Date]<>BLANK()  &&[Worry Date]=EARLIER('Table'[Worry Date])),[Mandatory])
return  IF("Yes" in _t, TRUE(),FALSE())

Output:

Eyelyn9_0-1638856637585.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@michael_knight , Try a new column like

 

new column =
var _cnt = countX(filter(Table, not(isblank([Worry Date])) && [Membership] = earlier([Membership]) && [Mandatory] ="Yes"),[Membership])
return
if(isblank(_cnt), false(), True())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors