Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago

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

  • Anonymous's avatar
    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.

     

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft 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