Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I need to group by 'garage id' and 'block id' then list with count the Problem Sub Code.. see sample data with results below:
Solved! Go to Solution.
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
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi, @CharlotteCity12,
If you fancy your result in Power Query, here's the code:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTI0ARL+IQFKsTpIAmbGLngETNG1YBUIdyYkgKLFDKQiPFwpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"garage id" = _t, blockid = _t, problem_subcode = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"garage id", Int64.Type}, {"blockid", Int64.Type}, {"problem_subcode", type text}}),
#"Grouped Rows1" = Table.Group(#"Changed Type", {"blockid", "garage id", "problem_subcode"}, {{"Count", each Table.RowCount(_), Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows1", "text_formula", each [problem_subcode] & " ("&Text.From([Count])&")"),
#"Grouped Rows2" = Table.Group(#"Added Custom", {"garage id", "blockid"}, {{"problem_Chain", each [text_formula]}}),
#"Extracted Values2" = Table.TransformColumns(#"Grouped Rows2", {"problem_Chain", each Text.Combine(List.Transform(_, Text.From), ","), type text})
in
#"Extracted Values2"
Please note, I tested it on manually put data, you have to modify the source if you want to see it working in your table.
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
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 49 | |
| 40 | |
| 32 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 85 | |
| 70 | |
| 37 | |
| 28 | |
| 27 |