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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Bebo
Helper II
Helper II

Measure to Count Rows that Meet Two Criteria

I have a table that contains three primary columns - Location (Text), Event Type (Text) and Event Value (Number). I have been trying to define a measure that will count the number of rows that meet specific criteria. For example, if Location=X and Event Type=Y and Event Value =Z, than count that row and summarize. Following is sample data:

Date / TimeLocationEvent TypeEvent Value
 Los AngelesValve0
 Los AngelesFeed1
 DallasFeed1
 San AntonioFeed 
    
    
    
    

So, in the example above, count the number of rows that meet this criteria: Location = Dallas, Event Type=Feed,Event Value=1

Any ideas?

1 REPLY 1
ValtteriN
Super User
Super User

Hi, 

You can use FILTER combined with countrows.

E.g. 

Measure = COUNTROWS(FILTER(table,column1=state1&&column2=state2&&column3=state3))
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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