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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.