Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I hace two tables with different number of columns but they share several columns.
Table A
Table B
Both tables have column "type".
I need to join both tables to include for each client the rows from table B of the same "type" that are not in table A.
This must be the result:
Any help?
Thanks a lot!
Solved! Go to Solution.
Table A
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcjZU0lFyBGJfEMPQQClWB1nQCEnQCCZojE0QpjIWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CUSTOMER = _t, TYPE = _t, MATERIAL = _t, NET = _t])
in
Source
Table B
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUfI1VIrVgTKNEExjpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [TYPE = _t, MATERIAL = _t]),
#"Added Custom" = Table.AddColumn(Source, "CUSTOMER", each List.Distinct(#"Table A"[CUSTOMER])),
#"Expanded Customer" = Table.ExpandListColumn(#"Added Custom", "CUSTOMER")
in
#"Expanded Customer"
Merge Table
let
Source = #"Table A" & #"Table B",
#"Removed Duplicates" = Table.Distinct(Source, {"CUSTOMER", "TYPE", "MATERIAL"})
in
#"Removed Duplicates"
Table A
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcjZU0lFyBGJfEMPQQClWB1nQCEnQCCZojE0QpjIWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CUSTOMER = _t, TYPE = _t, MATERIAL = _t, NET = _t])
in
Source
Table B
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUfI1VIrVgTKNEExjpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [TYPE = _t, MATERIAL = _t]),
#"Added Custom" = Table.AddColumn(Source, "CUSTOMER", each List.Distinct(#"Table A"[CUSTOMER])),
#"Expanded Customer" = Table.ExpandListColumn(#"Added Custom", "CUSTOMER")
in
#"Expanded Customer"
Merge Table
let
Source = #"Table A" & #"Table B",
#"Removed Duplicates" = Table.Distinct(Source, {"CUSTOMER", "TYPE", "MATERIAL"})
in
#"Removed Duplicates"
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |