Forum Discussion
Advanced Editor - Add Column from Related Table
- Anonymous9 years ago
Yes, I was mixing DAX with M. The end objective is to merge two tables, but Custom columns are not available in a merge. The big picture is to merge Actuals table with Targets table to visualize the % diffs. The Actuals table needs to join data between three tables and the required column is two joins over from the first table.
Enter the Advanced Editor of the middle table and add a table.join before the final "in" clause to get two columns (Account Key, SubRegion) from the Account table:
#"GetSubRegion" = Table.Join(#"Replaced Value2","Account Record Key",Table.SelectColumns(#"Account", {"Account Key","SubRegion"} ), "Account Key",JoinKind.Inner)
in
#"GetSubRegion"Enter the Advanced Editor of the first table and add a table.join before the final "in" clause to get two columns (Opportunity Key, SubRegion) from the above table:
#"GetSubRegion2" = Table.Join(#"GetFiscalQuarter","Opportunity LI Key",Table.SelectColumns(#"Opportunity", {"Opportunity Key","SubRegion"} ), "Opportunity Key",JoinKind.Inner)
in
#"GetSubRegion2"Now that SubRegion is in the first table the rest of the data can be grouped then merged with the Target table. Any shortcuts to this effort?
HTH,
Smitty
Yes, I was mixing DAX with M. The end objective is to merge two tables, but Custom columns are not available in a merge. The big picture is to merge Actuals table with Targets table to visualize the % diffs. The Actuals table needs to join data between three tables and the required column is two joins over from the first table.
Enter the Advanced Editor of the middle table and add a table.join before the final "in" clause to get two columns (Account Key, SubRegion) from the Account table:
#"GetSubRegion" = Table.Join(#"Replaced Value2","Account Record Key",Table.SelectColumns(#"Account", {"Account Key","SubRegion"} ), "Account Key",JoinKind.Inner)
in
#"GetSubRegion"
Enter the Advanced Editor of the first table and add a table.join before the final "in" clause to get two columns (Opportunity Key, SubRegion) from the above table:
#"GetSubRegion2" = Table.Join(#"GetFiscalQuarter","Opportunity LI Key",Table.SelectColumns(#"Opportunity", {"Opportunity Key","SubRegion"} ), "Opportunity Key",JoinKind.Inner)
in
#"GetSubRegion2"
Now that SubRegion is in the first table the rest of the data can be grouped then merged with the Target table. Any shortcuts to this effort?
HTH,
Smitty
I was looking for this feature as well.
While noticed that DAX and M have their contexts in which each excels, I got used to RELATED functionality and wanted to use it in M's GetData context.
Good luck.