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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.