Forum Discussion
AlienBI
11 months agoFrequent Visitor
Issue with SAMETIMELASTYEAR
Hi there, I'm having troubles with SAMETIMELASTYEAR. I want to show what the revenue was LY at the same time in the table below from April 2025 to September 2025. I have a date filter for this, b...
- 11 months ago
Hi,
Please try something like below.
Please check the below image and the attached pbix file.
I tried to create [LY_T&K fix] measure.
danextian
Super User
11 months agoHi AlienBI
First, as a best practice, dispable auto-datetime and explicity create date element columns (year, month, quarter, etc). Auto-datetime creates an invisible table of dates for almost all date columns in your model and thus take up space.
Modify your formula to below:
CALCULATE (
SUM ( 'RA Subset'[T&K] ),
SAMEPERIODLASTYEAR ( 'Calendar'[Date] )
)
Ensure that the date/calendar table has been marked as such - Set and use date tables in Power BI Desktop . If not you will have to explicityly include a REMOVEFILTERS to your measure.
CALCULATE (
SUM ( 'RA Subset'[T&K] ),
SAMEPERIODLASTYEAR ( 'Calendar'[Date] ),
REMOVEFILTERS ( 'Calendar' )
)