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

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

Reply
simlee
Frequent Visitor

Measure count rows based on two column comparison and a filter

Hello guys, 

I'm looking for a measure of row count bases on column "C" = No Match and column "B value is bigger than A" = yes

As you can see in the below example, the count based on the two filters = 3

Annotation2.png

I try this formula but no success


Measure 1 =
CALCULATE (
COUNTROWS ('table'),
FILTER (
'table',
AND ( 'table'[c] = "Match", 'table'[D] = "yes" )
)
)

 

 I would be greatful if someone can help me figure out how this can be done.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=COUNTROWS(FILTER(Table,Table[C]="No match"&&Table[B]>Table[A]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=COUNTROWS(FILTER(Table,Table[C]="No match"&&Table[B]>Table[A]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hey Ashish,

 

I am still pretty new to Power BI so I am trying to take all of this in stride.

 

If you had the same situation, but had to compare columns from two separate tables instead of one table, what would you do? Would you have to use something like SUMMARIZE() to get something to like this to work?

Hi,

Please share some data, describe your question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you Ashish. It's working perferctly 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

In column D, there is no value for Match True

Measure 1 =
CALCULATE (
COUNTROWS ('table'),
FILTER (
'table',
AND ( 'table'[c] = "No Match", 'table'[D] = "yes" )
)
)

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

basically it's a measure based on two filters in 2 different columns; the "No match" in column B and "yes" on column D 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.