Forum Discussion
CH_MJR79
3 years agoHelper II
Comparing data same period last year
Hi all, I have table that contains lines posted to a timesheet each day for certain categories. I've created a measure that calculates the total 'Actual Units' for the year to date, but I also n...
- 3 years ago
Hi CH_MJR79 ,
According to your description, I modify the formula:
SickDaysYTD_Pre = VAR _Pre = DATEADD ( 'SickDays'[Date], -12, MONTH ) VAR _PreToday = DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) ) RETURN CALCULATE ( SUM ( SickDays[Actual_Units] ), DATESYTD ( _Pre, "11-30" ), 'SickDays'[Date] <= _PreToday )Get the correct result in my sample.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Satya_Bhamidipa
3 years agoHelper I
Please check my solution
Last Year = CALCULATE((Sum(Sheet1[Amount])),DATEADD(Sheet1[Date],-1,YEAR))