cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
christinek
Frequent Visitor

Count rows of a filtered table

I have a filtered table which looks like this (filtered on value > $5000):

 

ManagerClient NameValue
Johna $        5,300
Johnb $        5,200
Davidc $        6,500
Davidd $        6,200
Davide $        5,800
Colinf $        7,000

 

I want a CARD value to show 6 in this example which is the count of the rows.

 

I have tried adding a MEASURE using COUNTROWS, but not really sure how to add it correctly to factor in the filter if necessessary.

 

And to complicate it, the "Value" which the table is filtered on is from a different Data table to "Manager" and "Client". I am not sure if this will impact the solution. 

 

Any help appreciated.

1 ACCEPTED SOLUTION
abpgupta
Post Patron
Post Patron

Count1 = CALCULATE(COUNTROWS('Table'), 'Table'[Column3] >= 5000)

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Assuming Value is a measure that you have already written, write this measure

Measure = countrows(filter(generate(values(managers[manager]),values(clients[client]))),[Value]>5000)

Hope this helps.


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

Count1 = CALCULATE(COUNTROWS('Table'), 'Table'[Column3] >= 5000)

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors