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
ligalbert
Helper I
Helper I

How to Count and filter in Power bi to create a measure

I want to count all numbers in a column that are the number 10 

count.PNG

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @ligalbert ,

1. Create measure.

Measure =
CALCULATE(COUNT('Table'[Late Fees]),FILTER(ALL('Table'),'Table'[Late Fees]=10))
Measure 2 =
COUNTX(FILTER(ALL('Table'),'Table'[Late Fees]=10),[Late Fees])

2. Result:

vyangliumsft_0-1653382453456.png

 

If you need pbix, please click here.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

jcalheir
Solution Supplier
Solution Supplier

Hi you can create a measure that uses CountRows with a filtered table.

 

 

COUNTROWS(
    FILTER( YourTable, Late Fees = 10 )

)

 

 

For further information and other examples check out this article:

https://www.goodly.co.in/countif-power-bi-dax/

 

Hope it helps

amitchandak
Super User
Super User

@ligalbert ,Hope you need row count

A new measure  =

Countrows(filter(Table, Table[Late Fee] =10))

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.