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.
So I have something like this :
ID | ParentID | Name | Level |
1 | Name1 | 1 | |
2 | 1 | Name2 | 2 |
3 | 2 | Name3 | 3 |
4 | 3 | Name4 | 4 |
5 | 2 | Name5 | 3 |
6 | 4 | Name6 | 5 |
7 | 23 | Name7 | 3 |
What I want to accompish is to have the first parent name on every column.
The thing is that the parentID can be inexistant.
So in my example every FirstParentName would be Name1 except for ID 7. (i dont care what the FirstParentName would be for ID 7. I just dont want PowerBI to give me errors).
Any idea how to create this new column?
Thanks a lot!
Solved! Go to Solution.
This requires the PATH function, but requires that all parents also exist in the ID column. To avoid this, you must first create another column to fix it.
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
This requires the PATH function, but requires that all parents also exist in the ID column. To avoid this, you must first create another column to fix it.
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@alexsvi -
Are you attempting to use PATH ( ) simliar to https://www.daxpatterns.com/parent-child-hierarchies/# and you're receiving '23 does not exist'?
Does using the below satisfy your need?
EntityPath =
IFERROR (
LOOKUPVALUE ( 'Table'[Name], 'Table'[ID], 'Table'[ParentID] ),
BLANK ()
)
Proud to be a Super User!
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.
User | Count |
---|---|
106 | |
98 | |
75 | |
63 | |
62 |
User | Count |
---|---|
139 | |
104 | |
104 | |
80 | |
66 |