Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

SAMEPERIODLASTYEAR without proper calendar

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_KEYYEARMonthDateQrtMonth_№
2020012020Jan01.01.2020Q11
2020022020Feb01.02.2020Q12
2020032020Mar01.03.2020Q13
2020042020Apr01.04.2020Q24
2020052020May01.05.2020Q25
2020062020Jun01.06.2020Q26
2020072020Jul01.07.2020Q37
2020082020Aug01.08.2020Q38
Thank you in advance and hug you!:-)
1 ACCEPTED SOLUTION

@Anonymous , No, JUst mark that as date table. There can few reason it can still fail

 

refer https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw


View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@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.

 

Anonymous
Not applicable

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

 

refer https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors