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
Anonymous
Not applicable

new column from conditional expression of other column

Hi,

 

In Power BI Desktop,

 

I have this table Table 1:

power bi help.JPG

 I want to create a new column for Parent Name.

 

I tried creating another table Table 2:

 

power bi 2.JPG

I want to do a SQL query something like

 

Select Name

From Table 2

Where Table 2.ID = Table 1.Parent ID

 

to get a new column for Parent Name.

 

How can I do that? or achieve this any other way?

Thanks

 

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

I think you can do a simple LOOKUP within the same table

 

Try Adding this calculated column

 

Parent Name=LOOKUPVALUE([Name],[ID],[Parent ID])

Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

I think you can do a simple LOOKUP within the same table

 

Try Adding this calculated column

 

Parent Name=LOOKUPVALUE([Name],[ID],[Parent ID])

Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

OMG, I cannot thank you enough. That solved my problem instantly. I had been searching for this kind of function for hours.

Thanks so much.

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.