Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table that comes from SQL database.
Id_Employee | Id_ChiefEmployee | Name_Employee
Id_ChiefEmployee references Id_Employee
For the hierarchy, I use the following DAX:
Hierarchy = PATH(table1[Id_Employee]; table1[Id_ChiefEmployee])
The previous DAX creates for me the columns containing the hierarchy. For the name of chiefs, I use the following DAX:
Level1 = LOOKUPVALUE(table1[Name_Employee];table1[Id_Employee]; PATHITEM(table1[Hierarchy];1;TEXT)) Level2 = LOOKUPVALUE(table1[Name_Employee];table1[Id_Employee]; PATHITEM(table1[Hierarchy];2;TEXT))
The previous DAX creates 2 columns containing the names on a hierarchy.
On Power BI Desktop it works fine, when I refresh desktop, still working, when I publish, still working, but, when I referes by Power BI Web that visual breaks and show the following message:
The query referenced column 'table1'['Level 1'] which depends on another column, relationship or measure that is not in a valid state. Additional information: ''.
Hi @gluizqueiroz,
I was not able to reproduce the same problem on my side.
In your scenario, please test:
Level1 = LOOKUPVALUE(table1[Name_Employee];table1[Id_Employee]; PATHITEM(table1[Hierarchy];1;INTEGER))
Besides, here is a similar thread for your reference: The query referenced column ****** which depends on another column
Best regards,
Yuliana Gu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.