Forum Discussion
function SAMEPERIODLASTYEAR() not working
- Anonymous3 years ago
Hi JEM_Systems ,
I suggest you to create a calendar table with continuous date by CALENDAR()/CALENDARAUTO() function.
Calendar = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]))Measure:
LY Sales = CALCULATE(SUM('Table'[Sales]),SAMEPERIODLASTYEAR('Calendar'[Date]))Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi JEM_Systems - we would need a lot more info than that. How specifically is it not working? What kind of error does it return? Providing screenshots would help
- JEM_Systems3 years agoHelper I
Is not showing any data, could you RMDNA help me?
- Anonymous3 years agoNot applicable
Hi JEM_Systems ,
I suggest you to create a calendar table with continuous date by CALENDAR()/CALENDARAUTO() function.
Calendar = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]))Measure:
LY Sales = CALCULATE(SUM('Table'[Sales]),SAMEPERIODLASTYEAR('Calendar'[Date]))Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.