Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have a table that looks like this -
| ID | Financial Code |
| 1 | 123 |
| 2 | 456 |
| 3 | 789 |
| 3 | 102 |
| 2 | 223 |
| 1 | 413 |
And, I'd like to transform it into the following table as it enables me to have a single record for each ID.
| ID | Financial Code |
| 1 | 123, 413 |
| 2 | 456, 223 |
| 3 | 789, 102 |
Please can someone help me understand how I go about this?
HI @Anonymous,
You can also do these operations on the query editor side to transfer your table structure: (Table.Group nested with Text.Combine function)
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTI0MlaK1YlWMgKyTUzNwGxjINvcwhLONjQwgqsxgqoH6TUxBLJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, #"Financial Code" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Financial Code", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"ID"}, {{"Merge", each Text.Combine(List.Transform(_[Financial Code], each Text.From(_)),","), type text }})
in
#"Grouped Rows"
Regards,
Xiaoxin Sheng
Hi @Anonymous ,
You can create a measure like below:-
Measure =
CONCATENATEX ( VALUES ('Table'[Financial Code] ), [Financial Code], "," )
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 46 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |