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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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