Forum Discussion
sirlanceohlott
6 years agoAdvocate III
Previous Week To Date DAX
Good afternoon, I hope you are all doing well and staying healthy. I have a Week To Date Calculation and I'd like to create a Previous Week To Date Calculation; however, I'm lost. Here's ...
- 6 years ago
Hi, sirlanceohlott
Try measures as below:
Last Week to Date Reqs 2 = VAR CurrentDate = LASTDATE ( Calendar_DIM[Date] ) VAR DayNumberOfWeek = WEEKDAY ( LASTDATE ( Calendar_DIM[Date] ), 1 ) RETURN CALCULATE ( [Requirements], FILTER ( ALL ( Calendar_DIM[Date] ), WEEKDAY ( [Date], 1 ) <= DayNumberOfWeek && [Date] <= CurrentDate - DayNumberOfWeek && [Date] >= CurrentDate - DayNumberOfWeek -7 ) )Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-easonf-msft
6 years agoCommunity Support
Hi, sirlanceohlott
Try measures as below:
Last Week to Date Reqs 2 =
VAR CurrentDate =
LASTDATE ( Calendar_DIM[Date] )
VAR DayNumberOfWeek =
WEEKDAY ( LASTDATE ( Calendar_DIM[Date] ), 1 )
RETURN
CALCULATE (
[Requirements],
FILTER (
ALL ( Calendar_DIM[Date] ),
WEEKDAY ( [Date], 1 ) <= DayNumberOfWeek
&& [Date] <= CurrentDate - DayNumberOfWeek && [Date] >= CurrentDate - DayNumberOfWeek -7
)
)
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ChikkiGuggi
3 years agoRegular Visitor
Hi, Can you please help with Last Year Week to Date aswell