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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Derive Year from Datetime field

Hi All

I have a requirement to derive Year field from a datetime field (Field name is Installation DateTime). The data of the datetime field looks likes below : 

The formula I used to derive  the year is : New Column -> year('Table'[Installation DateTime]) but the results looks wrong . All values are shown as 1905. Expected data is 2017,2018,2019 but all show as 1905,1905,1905. (Screenshot attached below)

Also what should be the datatype and format of the new column.

Data for Datetime Field:

Field.PNG

 

Derived Year

Derived Year.PNG

Can someone please help on resolving this?

Note: I would require this in Timeseries as I will be using this for forecasting.

Thanks

Poojitha

 

 

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can change the data type of the Year column to Whole Number.

 

3.png

 

 

 

 

 

Best Regards,

Amy

 

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

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi  @Anonymous ,

 

Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can change the data type of the Year column to Whole Number.

 

3.png

 

 

 

 

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors