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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.