Forum Discussion

RichA08's avatar
RichA08
Frequent Visitor
10 months ago
Solved

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

DateUnits
1-Oct123
2-Oct126
3-Oct128
4-Oct131
5-Oct133
6-Oct136
7-Oct138
8-Oct141
9-Oct143
10-Oct146
11-Oct148
12-Oct151
13-Oct153
14-Oct156
15-Oct158
16-Oct161
17-Oct163
18-Oct166
19-Oct168
20-Oct171
21-Oct173
22-Oct176
23-Oct178
24-Oct181
25-Oct183
26-Oct186
27-Oct188
28-Oct191
29-Oct193
30-Oct196
31-Oct198

 

Today: 

DateUnits
1-Oct126
2-Oct129
3-Oct132
4-Oct135
5-Oct138
6-Oct141
7-Oct144
8-Oct147
9-Oct150
10-Oct153
11-Oct156
12-Oct159
13-Oct162
14-Oct165
15-Oct168
16-Oct171
17-Oct174
18-Oct177
19-Oct180
20-Oct183
21-Oct186
22-Oct189
23-Oct192
24-Oct195
25-Oct198
26-Oct201
27-Oct204
28-Oct207
29-Oct210
30-Oct213
31-Oct216
  • 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

  • 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

  • hello RichA08 

     

    as far as i know, power bi does not have memory, so it can not store previous result or dataset.

    you need to create a dataset consist of yesterday and today or two table of today and yesterday before imported into power bi.

     

    Thank you.

  • Anonymous's avatar
    Anonymous
    Not 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

  • 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.

  • Anonymous's avatar
    Anonymous
    Not 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.

  • Anonymous's avatar
    Anonymous
    Not 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

  • 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.