Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have two tables from a share point list, both the tables have their primary ID's. I would like to take each ID from one table and show all the possibilities of the other table in one query. Is this possible to do. (see tables below)
Table 1 ID |
3 |
7 |
8 |
9 |
12 |
13 |
Table 2 ID |
1 |
2 |
3 |
4 |
5 |
6 |
Results | Table 1 ID | Table 2 ID |
3 | 1 | |
3 | 2 | |
3 | 3 | |
3 | 4 | |
3 | 5 | |
3 | 6 | |
7 | 1 | |
7 | 2 | |
7 | 3 | |
7 | 4 | |
7 | 5 | |
7 | 6 | |
8 | 1 | |
8 | 2 | |
8 | 3 | |
8 | 4 | |
8 | 5 | |
8 | 6 | |
9 | 1 | |
9 | 2 | |
9 | 3 | |
9 | 4 | |
9 | 5 | |
9 | 6 | |
12 | 1 | |
12 | 2 | |
12 | 3 | |
12 | 4 | |
12 | 5 | |
12 | 6 |
Solved! Go to Solution.
Hi @Anonymous
If you want to create a new query, please create a new blank query, use code in Advanced editor as below:
let
Source = Table.SelectColumns(#"Table 1",{"ID1"}),
#"Added Custom" = Table.AddColumn(Source, "Custom", each #"Table 2"[ID2]),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
#"Expanded Custom"
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
If you want to create a new query, please create a new blank query, use code in Advanced editor as below:
let
Source = Table.SelectColumns(#"Table 1",{"ID1"}),
#"Added Custom" = Table.AddColumn(Source, "Custom", each #"Table 2"[ID2]),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
#"Expanded Custom"
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.