Forum Discussion
Subtract current row value from previous row value
Hi everyone,
I have a report that shows the summary of sales by day 1 and this can be filtered by other values like the sales rep, region and week number.
However, I want to present my data so that it will show the difference between the previous day sales and the current day.
Please note there is no date field in the table, just Day number and week number.
| Day# | Sales Amount | Difference |
| 1 | 1000 | |
| 2 | 1500 | 500 (Day 2 amount - Day 1 amount) |
| 3 | 2100 | 600 |
| 4 | 2000 | -100 |
| 5 | 1500 | -500 |
for the week slicer: we have values like
- Week 1, Week 2, Week 3, etc.
Hi Anonymous ,
There are many threads for the similar issue on this community:
https://community.powerbi.com/t5/Desktop/DAX-Subtract-previous-row-from-current-row/m-p/570742
Thanks,
Pragati
1 Reply
- Pragati11Super User
Hi Anonymous ,
There are many threads for the similar issue on this community:
https://community.powerbi.com/t5/Desktop/DAX-Subtract-previous-row-from-current-row/m-p/570742
Thanks,
Pragati