Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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, but it doesn't apply to my LY calculation - it shows data beyond September 25.
How do I make it work?
See here PBIX link and below for details:
My LY measure is :
Solved! Go to Solution.
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.
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.
Hi @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' )
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |