Forum Discussion

Hems's avatar
Hems
Frequent Visitor
4 years ago
Solved

Count rows and group by on multiple columns

  Columns are from different tables and need to get similar output using DAX
  • v-yanjiang-msft's avatar
    4 years ago

    Hi Hems ,

    According to your description, here's my solution.

    Create a measure.

     

    Count =
    CALCULATE (
        COUNT ( 'Table'[id] ),
        FILTER ( ALL ( 'Table' ), 'Table'[col1] = MAX ( 'Table'[col1] ) ),
        FILTER ( ALL ( 'Table2' ), 'Table2'[col2] = MAX ( 'Table2'[col2] ) )
    )
    

     

    Get the expected result.

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.