Forum Discussion
Time Intelligence for irregular events
- 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))
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))
amitchandak wrote:CalumSharp, make sure dates is marked as a date table. and in visual any period comes from date table
That's the trick! The date dimension was marked as a date table, but I was using the date in the fact data because it's what the customer would expect to see. I've done the reverse translation in the dimension and it's working as desired.