Forum Discussion
SamePeriodLastYear
This is just really strange.... What are you getting if you just do the following:
Calculate(
Max( 'Calendar'[Date] ) ;
Sameperiodlastyear( 'Calendar'[Date] )
)
or
Calculate(
Max( 'Table'[JobbSDate ) ;
Sameperiodlastyear( 'Calendar'[Date] )
)
I can't really see any remaining reason as to why this isn't working with the information provided.
If you could share the PBIX it would help but you need to make sure that the file does not contain any confidential information.
You can then share it by Google Docs or some similar filesharing service.
So the first one works and gives me the last date in my calendar table. The second one gives me the last day of the month for what I have selected. It is not giving me the prior year, it is showing me the same year that I am filtering for. I have been trying to create a work around to just give me the prior year and then use that in my calculation but that is not working either. For the calcuation below whether I am using the jobsdate for the date field from the calendar table I get the same error message.
- tex6286 years agoCommunity Champion
Are the year and month slicers from your facts table and not your calendar table? If so try swapping them to year/month columns in your calendar table!
/ J - Anonymous6 years agoNot applicable
That did it although I do not understand why making that change made the difference.