Forum Discussion

CharlotteCity12's avatar
CharlotteCity12
Microsoft Employee
4 years ago
Solved

Group and Count by Problem

I need to group by 'garage id' and 'block id' then list with count the Problem Sub Code.. see sample data  with results below:      
  • Samarth_18's avatar
    4 years ago

    Hi CharlotteCity12 ,

     

    Create a measure like below:-

    Measure = 
        VAR _Table = 
            SUMMARIZE(
                'Table',
                [Garage id],
                'Table'[Blockid],
                'Table'[problem_subcode],
                "Count",COUNTROWS('Table')
            )
    RETURN
        CONCATENATEX(_Table,[problem_subcode] & " " & "("&[Count]&")",", ")

    Output:-

     

    Thanks,

    Samarth