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
ilcaa72
Helper IV
Helper IV

Year Column.... Number, Text, or Date?

i have a year column and not sure which data type I should use... i dont have access to any other Date related information (which is fine, i dont need it) but wondering what is best data type to use the Year column as categories, slicer, filters, etc

 

whats the best practice?  thanks

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @ilcaa72

rajendran's answer could be a good suggest if your year column contains date like "2017/1/2" but you only need year "2017" value.

If your year column only refer to the column which values look like "2007", "2008" ect, set this column with "Number" type would be better for use as categories, slicer, filters, etc.

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @ilcaa72

rajendran's answer could be a good suggest if your year column contains date like "2017/1/2" but you only need year "2017" value.

If your year column only refer to the column which values look like "2007", "2008" ect, set this column with "Number" type would be better for use as categories, slicer, filters, etc.

 

Best Regards

Maggie

Anonymous
Not applicable

You can have the data type as "Date" and format to display "Year" only ( You can do that in Modelling -> Format).This will be good to use in other places : For Ex: If you use this on slicer , you cna get poper year ( by slecting Date hierarchy) And also to perform any date related evaluation/expression. An thoughts?

 

Thanks

Raj

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.