Forum Discussion
kenthub
9 years agoHelper I
Week to date so far
Ok first, please rest assured I have looked through what I presummed all possible answers in the forums first :D I am trying to create a matrix table that compares sales from the current week and...
- 9 years ago
Hi kenthub,
Could you try the formula below to see if it works?:smileyhappy:
Sales-CWeek = CALCULATE ( [SalesTotal], FILTER ( 'PeriodDate', YEAR ( 'PeriodDate'[Date] ) = YEAR ( NOW () ) && WEEKNUM ( 'PeriodDate'[Date], 2 ) = WEEKNUM ( NOW (), 2 ) ) )Regards
v-ljerr-msft
9 years agoMicrosoft Employee
Hi kenthub,
Could you try the formula below to see if it works?:smileyhappy:
Sales-CWeek =
CALCULATE (
[SalesTotal],
FILTER (
'PeriodDate',
YEAR ( 'PeriodDate'[Date] ) = YEAR ( NOW () )
&& WEEKNUM ( 'PeriodDate'[Date], 2 ) = WEEKNUM ( NOW (), 2 )
)
)
Regards
kenthub
9 years agoHelper I
Worked! Thanks so much!
I tried something similar by setting a second filter for the current year in the Calculate function but it wasn't showing as correct. I presume the filter function simplifies that and/or makes it easier when crunching dates?