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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors