Forum Discussion
Difference between Yesterday and Todays Sales
| Report Date 01/28/2020 | ||
| Vehicle Type | Target (a) | Actuals (b) |
| Car | 225 | 175 |
| SUV | 200 | 160 |
| Truck | 75 | 90 |
| Total Sales (as of Today) | 500 | 425 |
| Total Sales (prior day) (c) | 400 | |
| Difference | 25 |
(a) & (b) Target and Actuals comes thru data flow, so all I have to do is click refresh to get the updated sales as of today.
(c) However, to find the difference between what was yesterday and today sales I have to manually enter the value '400' from the Actual Total Sales (as of today) before I click refresh.
Question: is there any way this manual step can be eliminated ? And the Prior day sales can be automatically transferred from the Actuals before its refreshed with current sales?
hi Anonymous
For your case, it could not achieve in power bi for now, since the old data is covered after refresh, power bi could not get this "old' data any more.
Regards,
Lin
9 Replies
- lbendlin
Super User
Does your sales data have a date column? Does your datamodel have a calendar table?
- AnonymousNot applicable
Yes, I do have a calendar table. but, when the current data gets updated it overwrites the existing.
- lbendlin
Super User
So you are saying yesterday's data is no longer in the dataflow?
- amitchandak
Super User
Anonymous , Are you getting on recent data and not incremental data?
If it is not a direct mode refer
https://www.thebiccountant.com/2017/01/11/incremental-load-in-powerbi-using-dax-union/
Check for Current day and past day
- AnonymousNot applicable
Since the source has only current transaction (the existing data gets over written), so the incremental refresh option does not help I guess.
- AnonymousNot applicable
Anonymous ,
Ask your admin to add anoter dataflow that create total for yesterday, then use that flow in
Total Sales (prior day) (c) - v-lili6-msft
Community Support
hi Anonymous
For your case, it could not achieve in power bi for now, since the old data is covered after refresh, power bi could not get this "old' data any more.
Regards,
Lin