Forum Discussion
Anonymous
7 years agoNot applicable
parallelperiod does not work for me
Hi all, I struggeling with parallel period: i want to get the total sales of previous month, this is the formula I use: sales previous month = CALCULATE([Sum of sales]; PARALLELPERIOD('S...
v-yulgu-msft
7 years agoMicrosoft Employee
Hi Anonymous ,
Make you used a calendar table which contains continuous dates. For more details, please refer to this blog.
DateAdd vs ParallelPeriod vs SamePeriodLastYear; DAX Time Intelligence Question
Best regards,
Yuliana Gu
- Anonymous7 years agoNot applicable
Hi v-yulgu-msft,
I use a date table created with this query:
Dates = var BaseCalendar = CALENDARAUTO()RETURN GENERATE(BaseCalendar; var Basedate = [Date] var Yeardate = YEAR( Basedate) var monthnumber = MONTH(Basedate)Return row("day"; Basedate = [Date];"Year"; Yeardate;"Month Number"; monthnumber;"Month"; FORMAT ( Basedate; "mmmm" );"Year Month"; FORMAT ( Basedate; "yy mmm" )))BR,Maxim - Anonymous7 years agoNot applicable