Hello everyone,
I've been trying to get this resolved for the longest time with no luck.
My dataset currently has:
Name
Reports To
Role
For the "Role" - there are 5 tiers (from Lowest to Highest) - it is showing the current role of "Name"
1. Supervisor
2. Manager
3. Director
4. VP
5. CEO
Repots To = as the name states, it is who "Name" reports to
So this is what I've done so far:
First Column = Supervisor
if [Role] = "Supervisor" then [Name]
Second Column = Manager
if [Role] = "Manager" then [Reports To] else null
Third Column = Director
if [Role] = "Manager" then [Reports To] else if [Role] = "Supervisor" then let
Manager_Name = [Manager],
Director_Name = Table.SelectRows(#"Org Chart", each [Name] = Manager_Name){0}[Reports To]
in
Director_Name
else null
So the theory is that - I am trying to build an org chart.
if a supervisor is the main target in the row - it will populate that supervisors, manager, then director, then VP
i keep running into the error "Expression.Error: A cyclic reference was encountered during evaluation."
I cannot seem to figure out the logic behind it.
Essentially it only errors out if the "Role" is Supervisor - because I am trying to get it to look up - if Role is Supervisor, then look into Manger column then from there look up Name with the Manger's name to look up Reports To - so this way I can still generate the Directors name
I've included a screenshot of roughly what I am looking for.
Top part of the screenshot - is what I currently have
2nd part of the screenshot is what I want to be able to populate
Hope this makes sense
Thank you in advance!
I've been trying to get this resolved for the longest time with no luck.
My dataset currently has:
Name
Reports To
Role
For the "Role" - there are 5 tiers (from Lowest to Highest) - it is showing the current role of "Name"
1. Supervisor
2. Manager
3. Director
4. VP
5. CEO
Repots To = as the name states, it is who "Name" reports to
So this is what I've done so far:
First Column = Supervisor
if [Role] = "Supervisor" then [Name]
Second Column = Manager
if [Role] = "Manager" then [Reports To] else null
Third Column = Director
if [Role] = "Manager" then [Reports To] else if [Role] = "Supervisor" then let
Manager_Name = [Manager],
Director_Name = Table.SelectRows(#"Org Chart", each [Name] = Manager_Name){0}[Reports To]
in
Director_Name
else null
So the theory is that - I am trying to build an org chart.
if a supervisor is the main target in the row - it will populate that supervisors, manager, then director, then VP
i keep running into the error "Expression.Error: A cyclic reference was encountered during evaluation."
I cannot seem to figure out the logic behind it.
Essentially it only errors out if the "Role" is Supervisor - because I am trying to get it to look up - if Role is Supervisor, then look into Manger column then from there look up Name with the Manger's name to look up Reports To - so this way I can still generate the Directors name
I've included a screenshot of roughly what I am looking for.
Top part of the screenshot - is what I currently have
2nd part of the screenshot is what I want to be able to populate
Hope this makes sense
Thank you in advance!