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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

How to Count the number of Records in a Result set

Hello,

 

I have a measure setup in Power BI, that produces the follow results (see image below).  What I need to do is count the number of result recors. In the example below it is 12 records. This seems simple but I can't get any of the COUNT functions to produce what I need.

 

Lucour_0-1692105434329.png

 

1 ACCEPTED SOLUTION

If it is the count of rows for the table you could use:: 

count rows of incident table = COUNTROWS('Service Desk Metrics')

 
If it is the count of rows for calculated column AAV you could use::
count rows of calculated AAV column = COUNTX('Service Desk Metrics','Service Desk Metrics'[Average Actual Value])
 
Check out  the Microsoft Learn DAX Reference on Aggregated functions
 
Of that, the examples used in your case were COUNTROWS or COUNTX
 
Refer to DAX Guide for curated assistance from sqlbi.com.
Their tool DAX.do by SQLBI is helpful as well.
 
If for some reason you are yet to start using DAX Studio, Tabular Editor, and Measure Killer, I highly 
encourage you to install them now.
 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you foodd ! Your solution worked. I am good now.

foodd
Super User
Super User

Using a DAX Measure like:  Row Count of Incidents = COUNT('Service Desk Metrics'[Average Actual Value])
 
service desk.jpg
Anonymous
Not applicable

Thanks foodd.  The Average Actual Value column is a Measure itself, and it won't let me select it in the COUNT function you specified above.

If it is the count of rows for the table you could use:: 

count rows of incident table = COUNTROWS('Service Desk Metrics')

 
If it is the count of rows for calculated column AAV you could use::
count rows of calculated AAV column = COUNTX('Service Desk Metrics','Service Desk Metrics'[Average Actual Value])
 
Check out  the Microsoft Learn DAX Reference on Aggregated functions
 
Of that, the examples used in your case were COUNTROWS or COUNTX
 
Refer to DAX Guide for curated assistance from sqlbi.com.
Their tool DAX.do by SQLBI is helpful as well.
 
If for some reason you are yet to start using DAX Studio, Tabular Editor, and Measure Killer, I highly 
encourage you to install them now.
 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors