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

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.

Reply
zflory
Helper I
Helper I

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?

 

 

powerbi4.PNG

 

3 ACCEPTED SOLUTIONS
Zubair_Muhammad
Community Champion
Community Champion

Hi @zflory

 

Date is internally stored as a value

 

if Instead of 2017 you write 43100 you will get 31 Dec 2017


Regards
Zubair

Please try my custom visuals

View solution in original post

@zflory

 

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,

View solution in original post

5 REPLIES 5
Zubair_Muhammad
Community Champion
Community Champion

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?

 

powerbi4.PNGpowerbi5.PNG

@zflory

 

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


Regards
Zubair

Please try my custom visuals
bsas
Post Patron
Post Patron

Hi @zflory,

 

Use  Year(your date) and you'll receive 2017 or 2016...etc

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.