Forum Discussion

CalumSharp's avatar
CalumSharp
Frequent Visitor
5 years ago
Solved

Time Intelligence for irregular events

Hi, I'm trying to leverage the Time Intelligence functions (specifically SamePeriodLastYear and/or DateAdd) to compare transactional calls data year on year for an event that doesn't occurr on the sa...
  • amitchandak's avatar
    5 years ago

    CalumSharp , make sure dates is marked as a date table. and in visual any period comes from date table

     

    try like

    CallsAnswered = Calculate(sum(AllCalls[Calls]), filter(AllCalls,AllCalls[Outcome] = "Answered"))
    CallsAnswered_LastYear = calculate([CallsAnswered], SAMEPERIODLASTYEAR(Dates[CalendarDate]))

     

    or

     

    CallsAnswered_LastYear = calculate([CallsAnswered], dateadd(Dates[CalendarDate],-1, year))