Forum Discussion
Merge two tables with no usable identifiers
- 1 year ago
For some reason, you have chosen to not show what you expect for results from the data you have presented.
However, examination of your data shows that the articles are listed in exactly the same order in both tables. If that is truly the case and relevant, all you need to do is add the Delivery_Date column to your Table A. (If that is not the case, you will need to provide what I previously requested along with your logic in developing your result table)
let //Read in the data tables SourceA = Excel.CurrentWorkbook(){[Name="TableA"]}[Content], TableA = Table.TransformColumnTypes(SourceA,{{"Truck_ID", type text}, {"Article_Number", Int64.Type}}), SourceB = Excel.CurrentWorkbook(){[Name="TableB"]}[Content], TableB = Table.TransformColumnTypes(SourceB,{{"Delivery_Date", type date}, {"Article_Number", Int64.Type}}), //Add the delivery date column #"Add Delivery Date" = Table.FromColumns( Table.ToColumns(TableA) & {TableB[Delivery_Date]}, type table[Truck_ID=text, Article_Number=Int64.Type, Delivery_Date=date]) in #"Add Delivery Date"
The data I presented is an example of the tables I have. I dont think one could find the most likely delivery date for a given Truck_ID from what I provided but the real datasets are much larger and possibly large enough to make a correlation if that is possible somehow with Power Query or DAX.
The result should be a table with columns TruckID, Delivery_Date and Article_Number
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523