Forum Discussion
Recursive Hierarchy; Managers and Employees
- Anonymous4 years ago
Hi PrintDream ,
1. Here is a blog talking about similar issue, please check if it helps.
Power BI Tips & Tricks: Filter by Manager Hierarchy
2.Or you may try merge:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8jU0MlbSUQoFUbE6WPgmpmZAvi8aP9TcwlIpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ManagerID = _t, UserID = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"ManagerID", type text}, {"UserID", type text}}), #"Merged Queries" = Table.NestedJoin(#"Changed Type", {"UserID"}, #"Changed Type", {"ManagerID"}, "Changed Type", JoinKind.LeftOuter), #"Expanded Changed Type" = Table.ExpandTableColumn(#"Merged Queries", "Changed Type", {"UserID"}, {"Sub.UserID"}) in #"Expanded Changed Type"More threads:
Solved: Manager Level Hierarchies with multiples in Power ... - Microsoft Power BI Community
How to create end to end Hierarchy Column in Power BI to show Parent Child Relationship - YouTube
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi PrintDream ,
1. Here is a blog talking about similar issue, please check if it helps.
Power BI Tips & Tricks: Filter by Manager Hierarchy
2.Or you may try merge:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8jU0MlbSUQoFUbE6WPgmpmZAvi8aP9TcwlIpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ManagerID = _t, UserID = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ManagerID", type text}, {"UserID", type text}}),
#"Merged Queries" = Table.NestedJoin(#"Changed Type", {"UserID"}, #"Changed Type", {"ManagerID"}, "Changed Type", JoinKind.LeftOuter),
#"Expanded Changed Type" = Table.ExpandTableColumn(#"Merged Queries", "Changed Type", {"UserID"}, {"Sub.UserID"})
in
#"Expanded Changed Type"
More threads:
Solved: Manager Level Hierarchies with multiples in Power ... - Microsoft Power BI Community
How to create end to end Hierarchy Column in Power BI to show Parent Child Relationship - YouTube
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.