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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Create Column Same Day and Week of the Previous Year + DAX or Power Query

Hi everyone!

 

I need to add a column in my date table that contains the date of the same day of the previous year.

Here is an example:

We see that Tuesday 08/09/2020 last year was Tuesday 10/09/2019.

 

YearMonthDaySame Day Last YearDay of Week
2020908/09/202010/09/2020Tuesday

 

Is it possible to do this in Power Query or DAX?

Thanks!

1 ACCEPTED SOLUTION

@Anonymous , if you need a column

 

Date year back = date(year([date]), month([date]), day([date])-364)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Same weekday day last year is 364 days behind

 

 

CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-364,DAy))

 

Use date table.

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9

 

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 :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184


Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , thanks for your answer.

 

I don't need to create a measure, I need to create a calculated column in my date dimension that shows what the date was for the same week and day of the previous year.

I don't have to have any reference measurements, just my current date.

@Anonymous , if you need a column

 

Date year back = date(year([date]), month([date]), day([date])-364)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Excellent @amitchandak  ! Thanks!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors