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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Wolly
Helper I
Helper I

how to update a column based on the value of a different table value

I have two tables.  

 

One table has the stock price info:

TABLE1

Stock.         Ticker.    Price

Google.      Googl.   XXXX

Mastercard.  MA     YYYY

 

TABLE2 just has:

Ticker.   Price.

MA.        ????

 

 

How would i update the 2nd table to place the value "YYYY" in Price column?

1 ACCEPTED SOLUTION

@Wolly 

try to merge two tables

11.PNG12.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
Wolly
Helper I
Helper I

Is what I'm asking not doable? Ie to do it in Power Query?

Just use Merge Queries in Power Query. Select the common field to merge on, which in your example is Ticker. Then in your merged queries, create a new conditional column. If Table2[Price] is null then Table1[Price] else Table2[Price]. 

Ahmedx
Super User
Super User

if you have abbreviated names in the Ticker column in the second table, then you need this measure

Screenshot_2.png

This is in DAX.  How would i do it in a powerquery?  

 

I simplified the ask in original post.  But background: Table1 represents one account that has current market price information.  Table2 represents a second set of accounts that has stale price data, so i want to use Table1 as a reference.  Once Table2 is updated, I'd like to merge the two tables to get a consolidated table of accounts with all columns populated and up to date.

ryan_mayu
Super User
Super User

@Wolly 

is this what you want?

Column = maxx(FILTER(Table1,Table1[Ticker]=Table2[Ticker]),Table1[Price])

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




This is in DAX.  How would i do it in a powerquery?  

 

I simplified the ask in original post.  But background: Table1 represents one account that has current market price information.  Table2 represents a second set of accounts that has stale price data, so i want to use Table1 as a reference.  Once Table2 is updated, I'd like to merge the two tables to get a consolidated table of accounts with all columns populated and up to date.

@Wolly 

try to merge two tables

11.PNG12.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




CoreyP
Solution Sage
Solution Sage

There are several ways you could do this, the best method depends on the specific context of your data model. Why are these two tables separate? Are they showing different things or for different time periods? In any case, you can either merge the tables in Power Query. Or you can create a dimension table for stocks that would include the ticker symbol. Then create a relationship to both tables from this dimension. 

I'm looking to do this in a power query.  I simplified the task.  Table1 represents one account that has current market price information.  Table2 represents a second set of accounts that has stale price data, so i want to use Table1 as a reference.  Once Table2 is updated, I'd like to merge the two tables to get a consolidated table of accounts with all columns populated and up to date.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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