Forum Discussion
Can I Save Data Before it Refreshes?
Hi All,
My data refreshes daily and I need to compare it to the previous day. I cannot do incremental refresh as it is not done by date. The data deals in forecasting so it has future dates in it as well. Is there a way to save it into another table or have 2 different datasets refresh at different times?
Sample Dataset:
Yesterday
| Date | Units |
| 1-Oct | 123 |
| 2-Oct | 126 |
| 3-Oct | 128 |
| 4-Oct | 131 |
| 5-Oct | 133 |
| 6-Oct | 136 |
| 7-Oct | 138 |
| 8-Oct | 141 |
| 9-Oct | 143 |
| 10-Oct | 146 |
| 11-Oct | 148 |
| 12-Oct | 151 |
| 13-Oct | 153 |
| 14-Oct | 156 |
| 15-Oct | 158 |
| 16-Oct | 161 |
| 17-Oct | 163 |
| 18-Oct | 166 |
| 19-Oct | 168 |
| 20-Oct | 171 |
| 21-Oct | 173 |
| 22-Oct | 176 |
| 23-Oct | 178 |
| 24-Oct | 181 |
| 25-Oct | 183 |
| 26-Oct | 186 |
| 27-Oct | 188 |
| 28-Oct | 191 |
| 29-Oct | 193 |
| 30-Oct | 196 |
| 31-Oct | 198 |
Today:
| Date | Units |
| 1-Oct | 126 |
| 2-Oct | 129 |
| 3-Oct | 132 |
| 4-Oct | 135 |
| 5-Oct | 138 |
| 6-Oct | 141 |
| 7-Oct | 144 |
| 8-Oct | 147 |
| 9-Oct | 150 |
| 10-Oct | 153 |
| 11-Oct | 156 |
| 12-Oct | 159 |
| 13-Oct | 162 |
| 14-Oct | 165 |
| 15-Oct | 168 |
| 16-Oct | 171 |
| 17-Oct | 174 |
| 18-Oct | 177 |
| 19-Oct | 180 |
| 20-Oct | 183 |
| 21-Oct | 186 |
| 22-Oct | 189 |
| 23-Oct | 192 |
| 24-Oct | 195 |
| 25-Oct | 198 |
| 26-Oct | 201 |
| 27-Oct | 204 |
| 28-Oct | 207 |
| 29-Oct | 210 |
| 30-Oct | 213 |
| 31-Oct | 216 |
Hi, it is better to handle this type of scenario in backend itself. May be you can create a snapshot table, which will keep previous day's instance in another table before the data refresh. For every date, you may append into your snapshot table and keep track of your your history data accordingly.
If this helps to resolve your problem then please mark it as solution.
Thanks - Samrat
7 Replies
- samratpbi
Super User
Hi, it is better to handle this type of scenario in backend itself. May be you can create a snapshot table, which will keep previous day's instance in another table before the data refresh. For every date, you may append into your snapshot table and keep track of your your history data accordingly.
If this helps to resolve your problem then please mark it as solution.
Thanks - Samrat
- AnonymousNot applicable
Hi RichA08 ,
Thanks for reaching out to the Microsoft fabric community forum.A recommended approach is to use Fabric Dataflow Gen2. You can start by creating a dataflow that imports your source data (representing “Today”) and, in Power Query, add a timestamp column using the formula = DateTime.LocalNow(). This column will help you identify the refresh date for each snapshot. Save this dataflow as your “Raw Snapshot Loader” to a Lakehouse table. Next, Refresh the data in your dataflow the updated data should reach a new table in Lakehouse. Once set up, your Power BI dataset can connect to these Lakehouse tables and calculate yesterday-versus-today differences using DAX measures. This method is efficient because it keeps your data versioned within Fabric.
I hope this information helps. Please do let us know if you have any further queries.
Thank you - danextian
Super User
Hi RichA08
Power BI doesn't store a historical copy of the data so this must be stored somewhere else - an excel file, a database, etc. It reads whatever is in the datasource upon refresh and overrides the previously existing data. If you are on Fabric, as already mentioned by other users, you may use Dataflow Gen2 instead to pre-process your data instead of doing it in Power Query in Power BI as it has an option to append instead of simply to overwrite.
- AnonymousNot applicable
Hi RichA08
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you. - AnonymousNot applicable
Hi RichA08
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you - Watson_LIAORegular Visitor
I guess you can export the data to an excel file in sharepoint with flow (automatically) before refreshing the dataset, and you can re-import the data from that excel to Power BI and set to compare with the latest data.