Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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] )
Solved! Go to Solution.
This one works :O)
Total Hours Previous Week =
CALCULATE( [Total Hours Worked],
DATEADD('Fact Pay Detailed Report'[Timesheet],-7,DAY))
This one works :O)
Total Hours Previous Week =
CALCULATE( [Total Hours Worked],
DATEADD('Fact Pay Detailed Report'[Timesheet],-7,DAY))
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |