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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Manojsahu
New Member

How to write a measure to check at least any 3 conditions are satisfying out of 6

Hi Friends,

 

In a data set , I have created 6 different measures based on 6 different selection criteria to provide benefits to citizen . Now I want to write a measure which can return me number of beneficiary who are satisfying at least  3 of of 6 criteria. Issue is these 3 can be any combination among 6. Hence i am unable to use "IF" function as the combinations are becoming very large.

 

Pls help with the DAX function and syntax which i can use to create the measure

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@Manojsahu 

I can suggest smth.

maybe, you need a measure like

Measure = 
IF([beneficiary] = [criteria1], 1, 0) +
IF([beneficiary] = [criteria2], 1, 0) +
IF([beneficiary] = [criteria3], 1, 0) +
IF([beneficiary] = [criteria4], 1, 0) +
IF([beneficiary] = [criteria5], 1, 0) +
IF([beneficiary] = [criteria6], 1, 0)

then filter beneficiary with Measure >= 3


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

5 REPLIES 5
az38
Community Champion
Community Champion

@Manojsahu 

it doesn't look like a good idea for any BI tool and technique. But maybe if you provide more detailed explanation we could to give a hint to you


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
amitchandak
Super User
Super User

@Manojsahu ,Can you share sample data and sample output.

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

Unfortunately , I cant. 

 

In a data set,  I have created 6 different dax measures  to get number of  beneficiary based on 6 differnet criteria.

 

I can find number of beneficiary who are satisfying at least one criteria or all 6 criteria using the Calculate , Filter ,And and OR function But dont know how to find the count of beneficiary satisfying at least 2 criteria , or at least 3 criteria for that matter.

 

az38
Community Champion
Community Champion

@Manojsahu 

I can suggest smth.

maybe, you need a measure like

Measure = 
IF([beneficiary] = [criteria1], 1, 0) +
IF([beneficiary] = [criteria2], 1, 0) +
IF([beneficiary] = [criteria3], 1, 0) +
IF([beneficiary] = [criteria4], 1, 0) +
IF([beneficiary] = [criteria5], 1, 0) +
IF([beneficiary] = [criteria6], 1, 0)

then filter beneficiary with Measure >= 3


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Thank you so much @az38 . It worked absolutely fine.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.