Forum Discussion
Field from one table not directly related to another table
- Anonymous2 years ago
Hi check1 ,
Try merging the query twice like this and then combining the text:
let Source = Table.NestedJoin(TimeEntry, {"Ticket ID"}, Tickets, {"Ticket ID"}, "Tickets", JoinKind.LeftOuter), #"Expanded Tickets" = Table.ExpandTableColumn(Source, "Tickets", {"Employee ID"}, {"Employee ID"}), #"Merged Queries" = Table.NestedJoin(#"Expanded Tickets", {"Employee ID"}, Employee, {"Employee ID"}, "Employee", JoinKind.LeftOuter), #"Expanded Employee" = Table.ExpandTableColumn(#"Merged Queries", "Employee", {"Employee Name"}, {"Employee Name"}), #"Grouped Rows" = Table.Group(#"Expanded Employee", {"UserID"}, {{"Employee Names", each Text.Combine( List.Distinct([Employee Name]),",")}}) in #"Grouped Rows"
Note that the storage mode of the table for the merge query is Import.Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi check1 ,
Try merging the query twice like this and then combining the text:
let
Source = Table.NestedJoin(TimeEntry, {"Ticket ID"}, Tickets, {"Ticket ID"}, "Tickets", JoinKind.LeftOuter),
#"Expanded Tickets" = Table.ExpandTableColumn(Source, "Tickets", {"Employee ID"}, {"Employee ID"}),
#"Merged Queries" = Table.NestedJoin(#"Expanded Tickets", {"Employee ID"}, Employee, {"Employee ID"}, "Employee", JoinKind.LeftOuter),
#"Expanded Employee" = Table.ExpandTableColumn(#"Merged Queries", "Employee", {"Employee Name"}, {"Employee Name"}),
#"Grouped Rows" = Table.Group(#"Expanded Employee", {"UserID"}, {{"Employee Names", each Text.Combine( List.Distinct([Employee Name]),",")}})
in
#"Grouped Rows"
Note that the storage mode of the table for the merge query is Import.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- PwerQueryKees2 years ago
Super User
Anonymous this solution will give all the names of the original ticket creators for each user working on tickets. This not not how I understood the question, but if this is what is required, I would follow a similar approach.
- check12 years agoFrequent Visitor
Thank you Gao. I was able to create a merge that allowed me to pull the Employee Name. I appreciate your help!