Forum Discussion
Appending query to itself, keeping previous rows
- 1 year ago
Imagine the weekly update is like in the blue table (screenshot below) and the combined one from earlier updates is the green one and comes from an earlier run of the query
The following M-code will connect to tblSource (Source) AND tblPQ (History) and then append Source to History to create an extended tblPQ.
let Source = Excel.CurrentWorkbook(){[Name="tblSource"]}[Content], History = Excel.CurrentWorkbook(){[Name="tblPQ"]}[Content], #"Appended Query" = Table.Combine({History, Source}), #"Changed Type" = Table.TransformColumnTypes(#"Appended Query",{{"Snap", type date}, {"ID", type text}}) in #"Changed Type"It results in this:
and a next run may look like this:
etc.
Hi some_analyst ,
We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.
If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!
Thank you!
Hi some_analyst ,
Has your issue been resolved? If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a valued member of the Microsoft Fabric Community Forum!