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

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.

Reply
quinla01
Frequent Visitor

Add Column - Map ID to Value

Hi All, 

 

Hoping this is fairly simple. I have single table as shown below (real table has 1000's of rows)

 

Q1.JPG

 

I'm not interested in "Manager ID". I want manager name as per below. 

 

Q2.JPG

 

Any suggestions? The logic is something along the lines of

  • Get manager ID from column 3
  • If it's null do nothing. 
  • if it's not null then find ID in column 1 and retrun employee

 

Thanks

 

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @quinla01 

You could use LOOKUPVALUE Function to create a calculate column as below:

Manager = IF(ISBLANK('Table'[Manager ID])=FALSE(),LOOKUPVALUE('Table'[Employee],'Table'[ID],'Table'[Manager ID]))

Result:

6.JPG

 

Best Regards,

Lin

 

Community Support Team _ Lin
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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @quinla01 

You could use LOOKUPVALUE Function to create a calculate column as below:

Manager = IF(ISBLANK('Table'[Manager ID])=FALSE(),LOOKUPVALUE('Table'[Employee],'Table'[ID],'Table'[Manager ID]))

Result:

6.JPG

 

Best Regards,

Lin

 

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

That worked a charm. Many Thanks. 

 

Out of interest, do you know how this would be done from the query editor rather than in report view? 

 

Thanks

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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