Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Getting the successor up to 3rd Level

Dear Guru of PowerBI,
I have this table with three columns :
Worker Name | Successor | Status Plan

A worker could have not a successor or could more than 2 (from 0 to 3).
If I do manually the search 
1) Take Worker Name
2) See Successor 
3) Take Successor and look it up in Worker Name column

With step 3, I'm able to find the successor, but with dax code I can't 

SuccLevel2 = 
VAR Suclevel1 = LOOKUPVALUE(<Successor Name>, <Worker Name>, <Worker Name>)
VAR Suclevel2 = LOOKUPVALUE(<Successor Name>, <Worker Name>, Successore1)

return Suclevel2

 

How can I do it?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

Thanks for the reply from @lbendlin .

 

@Anonymous , here is my testing for your reference:

 

My sample:

vxuxinyimsft_0-1718869677157.png

 

Create a calculated column as follows

 

CombinedSuccessors = 
VAR SuccLevel1 = LOOKUPVALUE('Table'[Successor], [worker name], [Worker Name])
VAR SuccLevel2 = LOOKUPVALUE('Table'[Successor], [worker name], SuccLevel1)
VAR SuccLevel3 = LOOKUPVALUE('Table'[Successor], [worker name], SuccLevel2)
RETURN
IF(ISBLANK(SuccLevel1), BLANK(), SuccLevel1) & 
IF(ISBLANK(SuccLevel2), BLANK(), "," & SuccLevel2) & 
IF(ISBLANK(SuccLevel3), BLANK(), "," & SuccLevel3)

 

 

Output:

vxuxinyimsft_1-1718869764900.png

 

If this sample data is structurally different from the one you are using, please provide some sample data and the results you are hoping for: How to provide sample data in the Power BI Forum - Microsoft Fabric Community Or show them as screenshots or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

 

Thanks for the reply from @lbendlin .

 

@Anonymous , here is my testing for your reference:

 

My sample:

vxuxinyimsft_0-1718869677157.png

 

Create a calculated column as follows

 

CombinedSuccessors = 
VAR SuccLevel1 = LOOKUPVALUE('Table'[Successor], [worker name], [Worker Name])
VAR SuccLevel2 = LOOKUPVALUE('Table'[Successor], [worker name], SuccLevel1)
VAR SuccLevel3 = LOOKUPVALUE('Table'[Successor], [worker name], SuccLevel2)
RETURN
IF(ISBLANK(SuccLevel1), BLANK(), SuccLevel1) & 
IF(ISBLANK(SuccLevel2), BLANK(), "," & SuccLevel2) & 
IF(ISBLANK(SuccLevel3), BLANK(), "," & SuccLevel3)

 

 

Output:

vxuxinyimsft_1-1718869764900.png

 

If this sample data is structurally different from the one you are using, please provide some sample data and the results you are hoping for: How to provide sample data in the Power BI Forum - Microsoft Fabric Community Or show them as screenshots or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Have you considered using the PATH functions instead?

Anonymous
Not applicable

Yes, I've considered PATH function but since some successor are not present in dataset, PATH returns an error (That is correct).

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.