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

lookupValue

Cant get this to work at all: This is so over complicated, I am our only creator and am an analyst by trade (Excel, SQL, MySQL capable), and I have to make a decision on whether to use this software.

 

We need to get a column in table 1 to appear in table 2.

 

Both tables have been added via SMSS

table 1: Partner

            Column1: Name

            Column 2: Partnerreference

Table 2: Book

            Column 1: PartnerReference

 

I simply need the column "Name" to be added to the table "book"

 

This should be extremely simple but hey, it isn't. I have tried 15 different varients of Lookupvalue and nothing works. This took me 14seconds to do in excel, but I HAVE to do this within PowerBI within data that has already been loaded. Can anyone help, this is far too complicated and long winded for such a simple task.

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can create column or measure to get matched items using RELATED function, LOOKUPVALUE function, or FIRSTNONBLANK function .

 

For example:

 

Column1=RELATED(Partner[Name])

 

Column1= LOOKUPVALUE(Partner[Name], Partner[Partnerreference], Book[Partnerreference]))

 

Column1= CALCULATE (FIRSTNONBLANK (Partner[Name], 1 ),FILTER ( ALL ( Partner), Partner[Partnerreference]= Book[Partnerreference] ))

 

Best Regards,

Amy

 

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-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can create column or measure to get matched items using RELATED function, LOOKUPVALUE function, or FIRSTNONBLANK function .

 

For example:

 

Column1=RELATED(Partner[Name])

 

Column1= LOOKUPVALUE(Partner[Name], Partner[Partnerreference], Book[Partnerreference]))

 

Column1= CALCULATE (FIRSTNONBLANK (Partner[Name], 1 ),FILTER ( ALL ( Partner), Partner[Partnerreference]= Book[Partnerreference] ))

 

Best Regards,

Amy

 

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

 

Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Can you create a sample for both tables?

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

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.