Forum Discussion
imvivran2251
2 years agoNew Member
Difference from previous working day
Dear community members,
Looking for your expert advice on the following scenario:
I have a table with day-wise performance. The days in the table contain only working days (so, no data for Saturdays, Sundays, and holidays). I need to create a simple matrix to see the difference between the current and previous working dates.
| Date | Leads | Prev Day Diff | ||
| 23-Aug-23 | 2500 | |||
| 24-Aug-23 | 2500 | 0 | ||
| 25-Aug-23 | 4100 | 1600 | ||
| 28-Aug-23 | 6626 | 2526 | ||
| 29-Aug-23 | 7600 | 974 | ||
| 30-Aug-23 | 7600 | 0 | ||
| 31-Aug-23 | 7600 | 0 | ||
| 1-Sep-23 | 7600 | 0 | ||
| 5-Sep-23 | 10726 | 3126 | ||
| 6-Sep-23 | 10726 | 0 | ||
| 7-Sep-23 | 10726 | 0 | ||
| 8-Sep-23 | 10726 | 0 | ||
| 11-Sep-23 | 10726 | 0 | ||
| 12-Sep-23 | 10726 | 0 |
The above table shows no data for Aug 26, 27 (Sat, Sun) and Sep 2, 3,4 (Sat, Sun, Holiday). The Prev Day column should consider that.
Please help.
Thanks
imvivran
1 Reply
- PadyHelper II
Hope this helps
Difference = IF(ISBLANK(CALCULATE(SUM('Table'[Leads]),OFFSET(-1,ALLSELECTED('Table'[Date]), ORDERBY([Date],ASC),DEFAULT))),"",CALCULATE(SUM('Table'[Leads])-CALCULATE(SUM('Table'[Leads]),OFFSET(-1,ALLSELECTED('Table'[Date]), ORDERBY([Date],ASC),DEFAULT))))