Forum Discussion
Anonymous
4 years agoNot applicable
Calculating value for last two weeks
Hello, I have a dataset with fiscal weeks, here is a sample: Fiscal Year Fiscal Week Net Hires Net Hires Previous Two Weeks Date 2021 48 100 12/27/2021 2021 49 50 150...
- 4 years ago
Anonymous you can use a measure like this
Measure = VAR week = MAX ( tbl[Fiscal Week] ) VAR cal = CALCULATE ( SUM ( tbl[Net Hires] ), FILTER ( ALL ( tbl ), tbl[Fiscal Week] >= CALCULATE ( MAX ( tbl[Fiscal Week] ), tbl[Fiscal Week] < week, ALL ( tbl ) ) && tbl[Fiscal Week] <= week ) ) RETURN cal
Anonymous
4 years agoNot applicable
Thank you SOOOOOOOOOOO much!