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
dats
Resolver I
Resolver I

lookup value and replace value on ecolumn power Query

Hello,

 

I am trying to reclass/replace values in Table A column GTIN based on what is stated in Table B column GTIN.NEW

I am loading some data (500.00 rows and 10 columns to power bi) in Table A and Table B has 2 columns and a few rows.

In example this is what table a looks like:

 

ProductnameGTINValueVolume
Bikes1231001
Cars4563001

 

This is my data table A.

Now I have a second table B which has to columns:

GTINGTIN.NEW
123111
456222

 

I know i could do this after loading all the data and create a calculated column and use the lookupvalue function but is there a way to do this before loading the data into the model using power query? Would you recommend it in terms of performance?

 

Kr 🙂

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@dats 

It will still work. You will get null for rows where the GTINs values do not coincide. You can the create a new conditional column to select either the new or the old value, and finally delete the previous GTIN columns





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

5 REPLIES 5
dats
Resolver I
Resolver I

I might add that table B does not have the same amount of entries ass Table A. Table B only consists of the GTINs that need to be changed 

PaulDBrown
Community Champion
Community Champion

@dats 

From the sound of it you could merge both tables in Power Query by linking the GTIN columns. 
Then delete the old GTIN column once the merge table is created





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@PaulDBrown that would only work if table B has the same GTIN entries as table A, or?

PaulDBrown
Community Champion
Community Champion

@dats 

It will still work. You will get null for rows where the GTINs values do not coincide. You can the create a new conditional column to select either the new or the old value, and finally delete the previous GTIN columns





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@PaulDBrownthanks. This worked as needed

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.