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.
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?
Solved! Go to Solution.
Check out the YEAR function
https://msdn.microsoft.com/en-us/library/ee634567.aspx
Hi @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,
Check out the YEAR function
https://msdn.microsoft.com/en-us/library/ee634567.aspx
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?
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,
Hi @zflory
Date is internally stored as a value
if Instead of 2017 you write 43100 you will get 31 Dec 2017
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 |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |