Forum Discussion
SamePeriodLastYear
Try
Total Est Rev PY = CALCULATE([Total Est Rev],ALL('Calendar'),SAMEPERIODLASTYEAR('Calendar'[Date]))
If im not misstaken you have a doublesided crossfilter relationship between your calendar and your facts table. This should be the reason that your measure isn't working without the ALL() statement.
Br,
J
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.
- littlemojopuppy6 years ago
Community Champion
Can you share the PBIX file?
- Anonymous6 years agoNot applicable
How do I do that safely?
- tex6286 years ago
Community Champion
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 ago
Community 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.