Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Having an issue whereby using SAMEPERIODLASTYEAR it's not recognising a date column, even though it's definitely formatted that way.
DAX...
Coming back with the following error...
Then looking at the Academic Year Conversion column, this is definitely formatted as DATE..
...same in QueryEditor...
Any idea where I'm going wrong?
Using the auto-generated date/time hierarchies is one of the worst things you can do in Power BI. Please never do this. Stick to a calendar that you either import or create in Power Query. You'll then always be safe and will reduce the model size as well.
@Anonymous , remove .year. But better use a date table
PGT Previous = if([PGT Int Pop] = BLANK(), BLANK(), [PGT Int Pop] - CALCULATE([PGT Int Pop], SAMEPERIODLASTYEAR('Academic Year Conversion'[Academic Year])))
PGT Previous = if([PGT Int Pop] = BLANK(), BLANK(), [PGT Int Pop] - CALCULATE([PGT Int Pop], SAMEPERIODLASTYEAR('Date'[Date])))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 6 |