Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
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 2 separate tables to store products. Although it is 2 different tables, their structure is exactly the same.
In these tables, each line has an item and the indication to which departments it should be made available.
However, because there are 2 tables, the same item can appear in the tables and in each one marking different departments.
I would like to make a table unifying the 2 previous ones and making sure that the item that appears repeated in the tables does not come out in 2 lines but that its line is merged, pointing in the new table the departments of the 2 tables.
Obviously this concept of departments is not real, I just used it to try to better explain my situation.
Please can you help me to resolve this?
Solved! Go to Solution.
Hello - here is how you can accomplish this.
SCRIPT
let
Source = Table.Combine({Table01, Table02}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {"Product"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] = "x")),
#"Pivoted Column" = Table.Pivot(#"Filtered Rows", List.Distinct(#"Filtered Rows"[Attribute]), "Attribute", "Value")
in
#"Pivoted Column"
That's perfect!
Hello - here is how you can accomplish this.
SCRIPT
let
Source = Table.Combine({Table01, Table02}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {"Product"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] = "x")),
#"Pivoted Column" = Table.Pivot(#"Filtered Rows", List.Distinct(#"Filtered Rows"[Attribute]), "Attribute", "Value")
in
#"Pivoted Column"
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 |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |