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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
PeterL1
Helper I
Helper I

Difficulty with SAMEPERIODLASTYEAR

Hi, 

 

To try and minimize the amount of data from my database import to Power Bi, i have summarized my sales data to week numbers and years (this is how we analyse reports anyways and not by days).

 

What i cannot figure out now, is how to be able to use the SAMEPERIODLASTYEAR when i only have week numbers, months and years from my sales data.

 

Any suggestions?

 

Thanks

Peter

1 ACCEPTED SOLUTION
RolandsP
Resolver IV
Resolver IV

Hi,

You can generate Start of week or End of week date and use SAMEPERIODLASTYEAR with that date. Please note that you need to create Date table to be able to use SAMEPERIODLASTYEAR and other Time Intelligence functions.

View solution in original post

2 REPLIES 2
RolandsP
Resolver IV
Resolver IV

Hi,

You can generate Start of week or End of week date and use SAMEPERIODLASTYEAR with that date. Please note that you need to create Date table to be able to use SAMEPERIODLASTYEAR and other Time Intelligence functions.

Yeah seems to be as easy as that, thanks for the help.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors