Forum Discussion
Merging two tables
- 1 year ago
Hi Mangnuel
In this case, you should be able to use “Merge Queries as New”.
In Power Query:
- Select your Table1 and in the Combine section of the Home menu, select Merge Queries As New.
- In the Merge window, select Table 2 as the second table. Select the common columns in each table ( Date and Asset-Code ) using the CTRL key, and hit OK.
- In the Merge1 table, expand the Table 2 column, and select ONLY Yield Utility and hit OK.
- In the new Yield Utility column, filter out the null values.
Let me know if you have any questions.
- Anonymous1 year ago
Thanks for the reply from tharunkumarRTK and gmsamborn , please allow me to provide another insight:
Hi Mangnuel ,Here are the steps you can follow:
1. Create calculated table.
Table = ADDCOLUMNS( 'Table 1', "Yield Utility", SUMX( FILTER(ALL('Table 2'), 'Table 2'[Date]=EARLIER('Table 1'[Date])&& 'Table 1'[Asset-Code]=EARLIER('Table 1'[Asset-Code])),[Yield Utility]))2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Problem is,
First Tabel, Daily resolution.
Seconde Tabel, monthly resolution.
So I only have one value on the first day of the month beeing the monthly total.
OK.
First, I can't think of an easy way to do it in DAX. Not saying there isn't a way.
Second, if you have a date table you should use either a month-name column or preferably a Yr-Mon column instead of the date column.
Does this help?
Also, can you show the expected result from your example data to verify numbers?
(also best would be a pbix with sample data)