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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
hkrash0920
Helper I
Helper I

Countrows Function

Hi...I am not sure I what I about to say correctly so please forgive me. I am trying to count rows in a table and have the filters that have applied to the table outside applied.

 

When I use the Count function where all the fields are listed, I get the correct number.

 

Capture.PNG

 

However, I want to change the name of the column from "count of client" to something else and you can't do that so I was trying to create an expression to get the same output but have been unsuccessful.


My expression is:

 

Client Count = COUNTROWS(ALLSELECTED('Global Sales and Pipeline Extra'[Client]))

 

Any help is appreciated.

 

Thanks

 

 

1 ACCEPTED SOLUTION

And how have you written Client Count for that screenshot? COUNTA should give the same results as the count quick measure unless you've added something else.





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

Proud to be a Super User!




View solution in original post

7 REPLIES 7
KHorseman
Community Champion
Community Champion

Why would you not just use counta?

 

Client Count = COUNTA('Global Sales and Pipeline Extra'[Client])





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

Proud to be a Super User!




The outcome is not right. I am assuming it is counting all the text characters in each cell. The column is all text. Thanks. 

No, it's counting each non-blank row in the column given the filter context, including duplicate values. Maybe you want DISTINCTCOUNT? It's unclear how your data is structured or how exactly the incorrect results are incorrect.





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

Proud to be a Super User!




Capture.PNG

 

Here is a screenshot of it. Does this help? Count of client is correct.

 

And how have you written Client Count for that screenshot? COUNTA should give the same results as the count quick measure unless you've added something else.





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

Proud to be a Super User!




@hkrash0920

Check to see which count is automating by clicking the drop down arrow by the name in your fields. Then create a measure to match. See image.snip.JPG





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

Proud to be a Super User!




Counta as a measure worked. When I did it as a new column, it didn't. Thank you...thank you...thank you.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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
Top Kudoed Authors