Forum Discussion
Time intelligence function working for leap year or not
- 1 year ago
Hi tomas12344, the best solution is to test it out π
As you can see from the example below, SAMEPERIODLASTYEAR() considers leap year:
I always suggest to have a tehcnical measures that are showing you what period is actually selected (which might be different from what one expects π )
Here is a code of the measure for this test:
Same Period Last Year = VAR _SamePeriodLastYear = SAMEPERIODLASTYEAR( c_Calendar[Date] ) VAR _MinDate = MINX( _SamePeriodLastYear, [Date] ) VAR _MaxDate = MAXX( _SamePeriodLastYear, [Date] ) VAR _Result = IF( _MaxDate <> _MinDate, "Currently Selected Same Period Last Year: " & _MinDate & " - " & _MaxDate, "Currently Selected Same Period Last Year: " & _MinDate ) RETURN _ResultGood luck with your task!
Hi @tomas12344,
We wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Thanks and regards,
Anjan Kumar Chippa
Hi @tomas12344,
As we havenβt heard back from you, we wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Thanks and regards,
Anjan Kumar Chippa