Forum Discussion
nhol
8 years agoAdvocate II
year format
Hi, I have an Excel file with year column as 2017, 2016, 2015 etc. In addition I have a month colmun. When I source this Excel sheet, the year as oppose to the month column is not recognized by Po...
- 8 years ago
If you need to sort the data my the month and year, you can create a new calculated field.
month-year = format([month],"00")&"-"&[Year]
ganesh575
8 years agoFrequent Visitor
Hi NirH,
In Power BI, it’s impossible to set a year column to 'Date' type in “yyyy” format. If you change a column with just years into date type format, it will format your data into a date.
Why does it do this? Well, it's probably because there is really no reason to convert years to a Date field anyway. It doesn't give you any extra functionality or anything. You can use the year field however you want (as a filter, in a visual, in a measure) WITHOUT it being in Date format!
My suggestion: leave the column in whole number / integer format.
Hope this helps.
Ganesh