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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Same Week Last Year

Hi all!

I know this is a largely discussed topic, but I haven't been able to find a fix that works for me.

I'm trying to create a measure that calculates the amount of Impressions for the Same Week Last Year. I've treid many functions, but

I've never been able sort out the 1 day offset issue:

Last Calendar Week (or Week #2 2019) is  Jan 6 – Jan 12, 2019

Same Calendar Week Last Year (or Week #2 2018) was Jan 7 – Jan 13 2018

 

What I would like to achieve now is this: 

Ideally, the Last Year Week measure should calculate the following:

 

  1. Take the First day of the Current Year Week Num (Jan 6, 2019), and take it 364 days back.
  2. Take the Last day of the Current Year Week Num (Jan 12, 2019), and take it 364 days back.
  3. Return all the days that roll between the days obtained from steps 1 and 2 (i.e. from Jan 7, 2018 to Jan 13, 2018)

Can someone help me out in writing the DAX function for the above? Or provide other solutions? 

 

Thanks!

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

@Anonymous

 

Have you tried:

 

 

DATEADD ( DATEADD ( 'Date'[Date]; -1; YEAR ); 1; DAY )

That should give you the dates you're looking for if the filter context is the week in 2019

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Can you please provide the complete code, if possible. Am also facing same probklem.

AlB
Community Champion
Community Champion

@Anonymous

 

Have you tried:

 

 

DATEADD ( DATEADD ( 'Date'[Date]; -1; YEAR ); 1; DAY )

That should give you the dates you're looking for if the filter context is the week in 2019

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.