Forum Discussion

DeepakJha23's avatar
DeepakJha23
Icon for Helper I rankHelper I
3 years ago
Solved

Same Period Last Year

Hi PBI Community, I need some help with DAX Time Intelligence. I am writing a DAX function that uses the sameperiodlastyear function on the calendar date to evaluate the total percentage in the 1 y...
  • DeepakJha23's avatar
    DeepakJha23
    3 years ago

    Hi Pat,

    Thanks for responding.

    I was able to resolve this using the below logic :

    CALCULATE([Percentage],
    DATEADD(Calendar_Date,-[Previous_Year_Calendar_Day_Count],DAY),
    ALLEXCEPT(Date,[Calendar_Date])

    -[Previous_Year_Calendar_Day_Count] moves the calendar days of current fiscal year to exact number of days based on previous year count.This helped in overlapping the fiscal year start date.

    Thanks,

    Thanks,
    Deepak