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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.