Forum Discussion
Previous Year comparison - account for partial current Year
- Anonymous2 years ago
Hi ChrisCoxhill , amitchandak thank you for your prompt reply!
Please try the following measure to show only the month totals for the same period last year:Previous Year 2 = CALCULATE( SUM('SW Energy'[Cost]), FILTER( SAMEPERIODLASTYEAR('Date'[Date]), MONTH('Date'[Date]) <= MONTH(MAX('SW Energy'[Invoice Date])) ) )Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ChrisCoxhill , amitchandak thank you for your prompt reply!
Please try the following measure to show only the month totals for the same period last year:
Previous Year 2 = CALCULATE(
SUM('SW Energy'[Cost]),
FILTER(
SAMEPERIODLASTYEAR('Date'[Date]),
MONTH('Date'[Date]) <= MONTH(MAX('SW Energy'[Invoice Date]))
)
)
Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Thak you so much for this! That seems to have nailed it after implementing your solution and testing.
I appreciate the style of your reply too, can very clearly see it working side by side with the "wrong" version.
Cheers Joyce!
Chris