Forum Discussion

Alphasyrius's avatar
Alphasyrius
Frequent Visitor
6 years ago

Find the main value

Hello everyone

I have a table called "Project", the unique key is a 6-digit project number, column name "ProjectNumber". Each project can be part of a larger project, so I have a "ParentProject" column that can be empty when there is no parent object or contain the project number in 6 digits when there is one.

The problem is that a parent project can also have a parent, but the data I receive includes only the first parent.

My goal here is to be able to extract data that shows, for a given project, the full list of child projects, including level 2, 3 or even 4.

I'm a very basic PowerBI user, I was doing fine so far, but here, I'm stuck. I thought the lookupvalue function would do the trick, but I could be doing it wrong.

Besides, ideally, I'd have a loop like "Do.. While" (if that's even possible) to find the highest parent of any project, but you could create additioal column also to find level 1 level 2 and so on.

Last but not least : any book recommendation for me to learn a little more advanced features and about DAX for PowerBI?

Thank you!

2 Replies