Forum Discussion
SamePeriodLastYear
Try changing the format of the 'Calendar'[Date] column to Date isntead of DateTime. Looks like there might be an issue with the dataformatting.
/ J
I did that and it is still giving me blank as my results for the prior year. I am doing the exact same thing I have done before I just go not understand what the issue is.
- tex6286 years agoCommunity Champion
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.- Anonymous6 years agoNot applicable
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.
PY = Calculate(Sameperiodlastyear( 'Quotes Estimates US'[JobSDate] ))I will try and attach the pbix file.- 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