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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
maven23
Regular Visitor

DAX formula to count rows in one column based on value of another column

Hi!

I need help on this please since I've tried all other formulas I've seen in forums but to no avail. I have raw data with values and want to count the total passing and total number of samples based on criteria column (whether they are equal or less than the criteria). Each parameter also has a weight and compliance ratio is based on the number of passing samples multiplied by the criteria weight. The total number of samples is easy but count of pass and compliance ratio is quite challenging. Below is sample data and desired output. Your help is greatly appreciated. Thanks in advance.

 

maven23_0-1632912536798.png

 

P.S. I corrected the file, since what was uploaded earlier is incorrect. Thanks. 

 

2 REPLIES 2
amitchandak
Super User
Super User

@maven23 , Try a measure like . assume you have two measures

[Pass sample],[total Sample]

 

Max(Table[Creteria Percent]) * divide([Pass sample],[total Sample]) 

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
maven23
Regular Visitor

Corrected the file since what I uploaded earlier is incorrect. I just made up some fictitious data and since I'm in a hurry to post, I just drag the cursor without checking the criteria and weight. My bad. 😅

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.