Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have two related tables Labels and Issues. The relationshp is Many to One.
Many(Labels) to One(Issue)
However not all Issues have Labels.
I want to create another table that is 1:1 with Issue
One(New Table) to One(Issue)
And have two columns:
the Key from Issue,
and the second column: (NewConcatenatedColumn)
That has, concatenated text Labels[LabelText] for rows with the same Label Key/Issue Key.
I believe I have successfully started this endeavor with creating a new table, with distinct value from the Key of the Issues Table.
Can anyone help me with labeling my issues, so I no longer have issues?
Thanks in advance.
See screenshot below.
Solved! Go to Solution.
Hi
What is your goal for creating reports?
We need to know the goal so to define how to create the relationships.
If you just need to create a new table as you said,
Open edit queries->Advanced editor, add code (blue)
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUapSitWJVjICsirALGMgKxnMMgGyysAsUyArCcwyA7LywCxzICsXzAKZkgU3JRtuSiHclHKl2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Key = _t, #"label text" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Key", Int64.Type}}), Source2 = Table.NestedJoin(Issue, {"Key"}, #"Changed Type", {"Key"}, "Labels", JoinKind.LeftOuter), #"Expanded Labels" = Table.ExpandTableColumn(Source2, "Labels", {"Key"}, {"Labels.Key"}), #"Filtered Rows" = Table.SelectRows(#"Expanded Labels", each ([Labels.Key] = null)), #"Removed Columns" = Table.SelectColumns(#"Filtered Rows",{"Key"}), Bew=Table.Combine({#"Changed Type", #"Removed Columns"}) in Bew
Close &&apply
Then create a new table
Table = SUMMARIZE ( ADDCOLUMNS ( Labels, "new label text", CONCATENATEX ( FILTER ( Labels, [key] = EARLIER ( [key] ) ), [label text], "," ) ), [key], [new label text] )
Hi
What is your goal for creating reports?
We need to know the goal so to define how to create the relationships.
If you just need to create a new table as you said,
Open edit queries->Advanced editor, add code (blue)
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUapSitWJVjICsirALGMgKxnMMgGyysAsUyArCcwyA7LywCxzICsXzAKZkgU3JRtuSiHclHKl2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Key = _t, #"label text" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Key", Int64.Type}}), Source2 = Table.NestedJoin(Issue, {"Key"}, #"Changed Type", {"Key"}, "Labels", JoinKind.LeftOuter), #"Expanded Labels" = Table.ExpandTableColumn(Source2, "Labels", {"Key"}, {"Labels.Key"}), #"Filtered Rows" = Table.SelectRows(#"Expanded Labels", each ([Labels.Key] = null)), #"Removed Columns" = Table.SelectColumns(#"Filtered Rows",{"Key"}), Bew=Table.Combine({#"Changed Type", #"Removed Columns"}) in Bew
Close &&apply
Then create a new table
Table = SUMMARIZE ( ADDCOLUMNS ( Labels, "new label text", CONCATENATEX ( FILTER ( Labels, [key] = EARLIER ( [key] ) ), [label text], "," ) ), [key], [new label text] )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |