Forum Discussion
Calculating Previous Values
- Anonymous4 years ago
Would something like this serve? I am assuming that the source data has a [Fiscal Week Ends] column, not a hire date.
Last 2 Weeks New =
var currentweek = [Fiscal Week Num]var previousweek = [Fiscal Week Num]-1
var currentweekhires =
CALCULATE(
SUM(
'Terms & Hires SQL'[Net Hires]),
[Fiscal Week End]=currentweekvar previousweekhires =
CALCULATE(
SUM(
'Terms & Hires SQL'[Net Hires]),
[Fiscal Week End]=previousweekreturn
currentweekhires+previousweekhires
Hi Anonymous ,
Message 11 works well. Please try to create a similar DAX formula.
If you want to calculate with consecutive "week", you need to first create the year week column, then sort it with rankx function, and then use [sort] to represent the week based on the formula.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.