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 Everyone!
Could you please help with the current problem:
I try to use SAMEPERIODLASTYEAR formula and my calendar has no any information about days (cause I get just monthly sales) and it looks like this (below it's just a part, I have 2020-2022 period). PERIOD_KEY - it's a date format I get from vendor, so I've created another 4 column to define year and month (first day of month). And when I try to use this formula nothing happens:
LAST_PERIOD = CALCULATE([TOTAL_SALES_pack],SAMEPERIODLASTYEAR(Periods[Date]))
| PERIOD_KEY | YEAR | Month | Date | Qrt | Month_№ |
| 202001 | 2020 | Jan | 01.01.2020 | Q1 | 1 |
| 202002 | 2020 | Feb | 01.02.2020 | Q1 | 2 |
| 202003 | 2020 | Mar | 01.03.2020 | Q1 | 3 |
| 202004 | 2020 | Apr | 01.04.2020 | Q2 | 4 |
| 202005 | 2020 | May | 01.05.2020 | Q2 | 5 |
| 202006 | 2020 | Jun | 01.06.2020 | Q2 | 6 |
| 202007 | 2020 | Jul | 01.07.2020 | Q3 | 7 |
| 202008 | 2020 | Aug | 01.08.2020 | Q3 | 8 |
Solved! Go to Solution.
@Anonymous , No, JUst mark that as date table. There can few reason it can still fail
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
@Anonymous , Use date table
LAST_PERIOD = CALCULATE([TOTAL_SALES_pack],SAMEPERIODLASTYEAR(Date[Date]))
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4
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.
Hi, thank you!
The thing is Period this is my date table or I need to rename it as Date?
@Anonymous , No, JUst mark that as date table. There can few reason it can still fail
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 10 | |
| 10 | |
| 6 | |
| 5 |