Forum Discussion
Changing Column to Just Year
I have a column that needs to be in a date format for measures but I only want to show the year (2017). Is this possible?
Check out the YEAR function
https://msdn.microsoft.com/en-us/library/ee634567.aspxHi zflory
Date is internally stored as a value
if Instead of 2017 you write 43100 you will get 31 Dec 2017
It's not possible to keep only Year part for a Date column. Even you only give a year value, it will always transform into a date. And Zubair_Muhammad is correct, date value is stored as an integer within DAX/Power Query. If you directly give a Year value, it will be added as days to 1900/1/1.
Regards,
5 Replies
- bsas
Post Patron
- Zubair_Muhammad
Community Champion
Check out the YEAR function
https://msdn.microsoft.com/en-us/library/ee634567.aspx- zflory
Helper I
thank you Zubair_Muhammad, do you know why when I try to add a custom column (2017) and change the format type to "Date", it is changing to 1905?
- Zubair_Muhammad
Community Champion
Hi zflory
Date is internally stored as a value
if Instead of 2017 you write 43100 you will get 31 Dec 2017