Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Solved! Go to Solution.
Hi @Anonymous ,
This is my test table:
Please change data type from “Date” to “Text”.
Select Transform tab – Replace Values, enter the value you want to find and replace with.
Then you can change the year and maintain the day and the month.
Last, please remember to change data type from text to date.
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.
Hi @Anonymous ,
This is my test table:
Please change data type from “Date” to “Text”.
Select Transform tab – Replace Values, enter the value you want to find and replace with.
Then you can change the year and maintain the day and the month.
Last, please remember to change data type from text to date.
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.
Thank you very much for the detailed solution.
@Anonymous , In power query you can use
Date.AddYears([Date], 205)
Use on new column of transform the same column
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
68 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |