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
Anonymous
Not applicable

count rows based on distinct values from another column

Hello,

 

I am new to Power BI and I am just discovering DAX formulas. What I need is very simple but cannot find a clear answer in the different subjects.

 

I have a column with strings in it which are not unique. 

 

I want to count the number of rows for each unique string of this column.

 

Somebody has a clue?

 

TY!

 

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

Could you please mark the proper answer as solution or share the answer if it's convenient for you? That will be a help to the others.

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

There is a built-in Count aggregate that can handle this for you; you can use any other column on that table for the aggregate, and then rename the result to whatever you'd like.

 

PBIDesktop_2017-07-28_08-33-49.png

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.