Forum Discussion

PowerBI123456's avatar
PowerBI123456
Post Partisan
6 years ago
Solved

Countrows by ID

Hi, this seems like it would be simple to do, but I cant figure it out. How can I countrows by ID via a measure? For example, ID 1 has 4 rows. Thanks!

 

 

 

  • Hi PowerBI123456 

    I prefer this one

    Measure = CALCULATE(COUNTROWS(Table), ALLEXCEPT(Table, Table[ID]))

     

7 Replies

  • az38's avatar
    az38
    Community Champion

    Hi PowerBI123456 

    I prefer this one

    Measure = CALCULATE(COUNTROWS(Table), ALLEXCEPT(Table, Table[ID]))

     

      • az38's avatar
        az38
        Community Champion

        PowerBI123456 

        also you can create a calculated table

        New Table = SUMMARIZECOLUMNS('Table'[ID], "Count By ID", COUNT('Table'[ID]))