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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
colettb
Frequent Visitor

Need Help Writing Formula To Create Date

Hi Community!

 

I need help creating a formula for a New Column.  The result will be a date column based on another date column.

 

What I need to do is check today's date and create a column that contains January 1 of the year that is 4 years ago.

 

For example, If today is June 12, 2025, I want the formula to result in January 1, 2021. 

Another example is, if today is March 1, 2026, the result should be January 1, 2022.

 

Can someone help me with this?  I am a new Power BI user and have a lot to learn!

 

Thanks!

1 ACCEPTED SOLUTION
Shravan133
Super User
Super User

FourYearsAgoJan1 =
DATE(YEAR(TODAY()) - 4, 1, 1)

 

Example outputs:

Today’s Date Result
June 12, 2025 Jan 1, 2021
March 1, 2026 Jan 1, 2022

View solution in original post

2 REPLIES 2
Ashish_Excel
Resolver V
Resolver V

Hi,

Try this calculated column formula

=date(year(Data[Date])-4,1,1)

Hope this helps.

Shravan133
Super User
Super User

FourYearsAgoJan1 =
DATE(YEAR(TODAY()) - 4, 1, 1)

 

Example outputs:

Today’s Date Result
June 12, 2025 Jan 1, 2021
March 1, 2026 Jan 1, 2022

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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