The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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?
Solved! Go to Solution.
try to merge two tables
Proud to be a Super User!
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].
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.
is this what you want?
Column = maxx(FILTER(Table1,Table1[Ticker]=Table2[Ticker]),Table1[Price])
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.
try to merge two tables
Proud to be a Super User!
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.
User | Count |
---|---|
71 | |
64 | |
62 | |
49 | |
28 |
User | Count |
---|---|
117 | |
75 | |
61 | |
54 | |
42 |