Forum Discussion
SamePeriodLastYear
That is still resulting in the amounts being the same. I even changed the year to double check that I have plenty of data for 10/18 and I do. This is what my relationship between the quotes table and the calendar looks like. Any other thoughts? What is messed up is that in my jobs table I am doing the exact same thing with est and act revenue and it is working fine.
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
- Anonymous6 years agoNot applicable
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.