Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have two tables as below:
Cust
custo | suppo |
7 | a |
7 | b |
8 | a |
Supp
Suppo |
a |
b |
c |
I want to table/matrix visual as follows:
t1 =
custo | suppo |
7 | a |
7 | b |
8 | a |
t2 =
custo | suppo |
7 | c |
8 | b |
8 | c |
both tables are related by suppo column. How do i create t2 visual?
In Power Query this would be the approach
t2 query:
let
Source = Table.SelectColumns(t1,{"custo"}),
#"Removed Duplicates" = Table.Distinct(Source),
#"Added Custom" = Table.AddColumn(#"Removed Duplicates", "Custom", each Supp),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Suppo"}, {"Suppo"}),
#"Merged Queries" = Table.NestedJoin(#"Expanded Custom", {"custo", "Suppo"}, t1, {"custo", "suppo"}, "t1", JoinKind.LeftAnti),
#"Removed Other Columns" = Table.SelectColumns(#"Merged Queries",{"custo", "Suppo"})
in
#"Removed Other Columns"
in DAX it's easier as you can use EXCEPT
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
103 | |
94 | |
38 | |
30 |