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
That didn't work even when I found the columns....
My calculated column DAX is rusty, but here's a basic measure that'll do the job
- Anonymous4 years agoNot applicable
Close? Because fiscal weeks differ from actual week numbers, for example, last week was Fiscal Week # 52 of 2021 and this week is Fiscal Week # 1 of 2022.
So there will be a break in count, even though the dates on which fiscal weeks are consecutive...
For example:
Fiscal Week 50 of 2021
Fiscal Week 51 of 2021
Fiscal Week 52 of 2021
Fiscal Week 1 of 2022
I don't think that week number is a good value to use, I changed it Fiscal Week End Date in hopes that it would just work but it did not.