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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Data Shaping

Hello!

 

I am working with an example database that in the fact table has a date column with years 1900, 1901 and 1902. How can I change the years of this date column to other years (for example 2005,2006 and 2007) in the Query Editor, maintaining the day and the month?

1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @Anonymous ,

 

This is my test table:

vyadongfmsft_0-1661335513580.png

 

Please change data type from “Date” to “Text”.

vyadongfmsft_1-1661335513585.png

 

Select Transform tab – Replace Values, enter the value you want to find and replace with.

vyadongfmsft_2-1661335513587.png

 

Then you can change the year and maintain the day and the month.

vyadongfmsft_3-1661335513588.png

 

Last, please remember to change data type from text to date.

vyadongfmsft_4-1661335513590.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yadongf-msft
Community Support
Community Support

Hi @Anonymous ,

 

This is my test table:

vyadongfmsft_0-1661335513580.png

 

Please change data type from “Date” to “Text”.

vyadongfmsft_1-1661335513585.png

 

Select Transform tab – Replace Values, enter the value you want to find and replace with.

vyadongfmsft_2-1661335513587.png

 

Then you can change the year and maintain the day and the month.

vyadongfmsft_3-1661335513588.png

 

Last, please remember to change data type from text to date.

vyadongfmsft_4-1661335513590.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you very much for the detailed solution.

amitchandak
Super User
Super User

@Anonymous , In power query you can use

 

Date.AddYears([Date], 205)

 

Use on new column of transform the same column

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

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.