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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.