Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi everyone
I have one table like this
I want to change it to this in Power BI
How can I do that?
Solved! Go to Solution.
Hi @MinaPendar ,
I created a sample pbix file(see the attachment), please check if that is what you want. You can achieve it in Power Query Editor:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bY/LDsIgEEX/hXU3Npr+gjHRD7Bh0YSXxZRAik3/3jtDSFRcnMvjMDCMoziITlwfy4SBoYgxCtl9uRdQCrFtW3EnLO5TIrkAa/mEaqQD84wwxrDse77Wa9oD3nO5/Stz/pBHzC+BXwP7Trc796Nc/UV9j3o566cmuRIrF+8sh2HA6ha41USUSK3NtZ2MbGwgSgQh5Rs=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Name = _t, x = _t, y = _t, z = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}, {"x", type text}, {"y", type text}, {"z", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"ID", "Name"},
{
{"x", each Text.Combine([x],",")},
{"Countx", each List.Count([x]), Int64.Type},
{"y", each Text.Combine([y],",")},
{"County", each List.Count([y]), Int64.Type},
{"z", each Text.Combine([z],",")},
{"Countz", each List.Count([z]), Int64.Type}
},
GroupKind.Global),
getx = Table.RemoveColumns(
Table.SplitColumn( #"Grouped Rows",
"x",
Splitter.SplitTextByDelimiter(","),
List.Max(#"Grouped Rows"[Countx]),
"",
ExtraValues.Ignore),
{"Countx"}
),
gety = Table.RemoveColumns(
Table.SplitColumn( getx ,
"y",
Splitter.SplitTextByDelimiter(","),
List.Max(#"Grouped Rows"[County]),
"",
ExtraValues.Ignore),
{"County"}
)
,
getz = Table.RemoveColumns(
Table.SplitColumn( gety ,
"z",
Splitter.SplitTextByDelimiter(","),
List.Max(#"Grouped Rows"[Countz]),
"",
ExtraValues.Ignore),
{"Countz"}
)
in
getz
Best Regards
@Anonymous Hi , Thank you, solve my problem.
Hi @MinaPendar ,
I created a sample pbix file(see the attachment), please check if that is what you want. You can achieve it in Power Query Editor:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bY/LDsIgEEX/hXU3Npr+gjHRD7Bh0YSXxZRAik3/3jtDSFRcnMvjMDCMoziITlwfy4SBoYgxCtl9uRdQCrFtW3EnLO5TIrkAa/mEaqQD84wwxrDse77Wa9oD3nO5/Stz/pBHzC+BXwP7Trc796Nc/UV9j3o566cmuRIrF+8sh2HA6ha41USUSK3NtZ2MbGwgSgQh5Rs=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Name = _t, x = _t, y = _t, z = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}, {"x", type text}, {"y", type text}, {"z", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"ID", "Name"},
{
{"x", each Text.Combine([x],",")},
{"Countx", each List.Count([x]), Int64.Type},
{"y", each Text.Combine([y],",")},
{"County", each List.Count([y]), Int64.Type},
{"z", each Text.Combine([z],",")},
{"Countz", each List.Count([z]), Int64.Type}
},
GroupKind.Global),
getx = Table.RemoveColumns(
Table.SplitColumn( #"Grouped Rows",
"x",
Splitter.SplitTextByDelimiter(","),
List.Max(#"Grouped Rows"[Countx]),
"",
ExtraValues.Ignore),
{"Countx"}
),
gety = Table.RemoveColumns(
Table.SplitColumn( getx ,
"y",
Splitter.SplitTextByDelimiter(","),
List.Max(#"Grouped Rows"[County]),
"",
ExtraValues.Ignore),
{"County"}
)
,
getz = Table.RemoveColumns(
Table.SplitColumn( gety ,
"z",
Splitter.SplitTextByDelimiter(","),
List.Max(#"Grouped Rows"[Countz]),
"",
ExtraValues.Ignore),
{"Countz"}
)
in
getz
Best Regards
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 75 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |