Forum Discussion
rbalza
Helper III
5 years agoCalculating Previous Week & 2 Weeks prior using Data using Slicer
Hi Everyone,
Need the help of calculating the previous week's total number of hours compared to the current week when using a slicer filter.
I am using the weekending slicer which is based on the fact table.
Here's my measure.
Total Hours Previous Week =
CALCULATE( [Total Hours Worked],
DATESINPERIOD( 'Fact Pay Detailed Report'[Timesheet], MAX( 'Fact Pay Detailed Report'[Timesheet] ), -7, DAY ))Total Hours Worked = SUM( 'Fact Pay Detailed Report'[Total Hours] )
This one works :O)
Total Hours Previous Week = CALCULATE( [Total Hours Worked], DATEADD('Fact Pay Detailed Report'[Timesheet],-7,DAY))
1 Reply
- rbalza
Helper III
This one works :O)
Total Hours Previous Week = CALCULATE( [Total Hours Worked], DATEADD('Fact Pay Detailed Report'[Timesheet],-7,DAY))