Forum Discussion
alexsvi
5 years agoRegular Visitor
Calculated column to find first parent
Hi, Lets say I have this : ID ParentID Name Firts parent Name 1 0 Name1 Name1 2 0 Name2 Name2 3 1 Name3 Name1 4 1 Name4 Name1 5 2 Name5 Name2 6 3 Name6 ...
amitchandak
Super User
5 years agoalexsvi , Try a new column like
coalesce(maxx(filter(table, [ID] =earlier([parent_id])),[name]),[Name])
- alexsvi5 years agoRegular Visitor
I actually need to "go up" until I have a 0 in parent_id. I can have more than 5-6 layers in reality.
I tried your code and it almost work, but some doesnt "climb" to the top parent