Forum Discussion
New Data appended to Old Data
Hi,
I have created a SQL query that generates 1 row of data. I want to run this query daily and want the new row to be appended to the old data thus having a row per day. I am able to create a table in Power BI to house the results of the SQL query but I am not able to save the old data and get it appended to the new data on the same table. Please note that I need this accomplished within Power BI and saving the results of my SQL query somewhere else is not an option. How do I accomplish this? Please note that I am new at Power BI. Thank you.
| purchased | allocated | dt |
| 1000000 | 50000 | 5-2-2020 |
| 1002222 | 50023 | 5-3-2020 |
| 1011111 | 50101 | 5-4-2020 |
2 Replies
- AllisonKennedy
Community Champion
I can think of a few ideas that might work, but none are straightforward for new users to Power BI.
Have you read much on incremental refresh? It could help in this scenario:
https://docs.microsoft.com/en-us/power-bi/service-premium-incremental-refresh
Other feature I'm thinking that would be helpful would be to use custom functions to create a second query in the query editor which merges the daily refresh query with the previous rows data.
Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos.
I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query.
- v-juanli-msft
Community Support
Hi Anonymous
Please tell us how your original data source update.
For example, every day, new data comes, it appends under the old data,
or everyday the new data would replace the old data, so the old data would not show in your original source.
If case1, then incremental refresh may work.
Best Regards
Maggie