0
votes

I pulled data into Power BI from a SQL query which returns only the order year in one of the columns. In Power BI I formatted the column as "Data type Date" and "Date time format 2001(yyyy)", but when I pull that column into a table in Power BI, it's clearly calculating 2020 and 2021 as the number of days from 1/1/1900 (like excel) because it shows the year as 1905 for both when inserting this column into a visual, instead of years 2020 and 2021.

How can I format this column as the year 2020 and 2021?

Thank you,

you cannot format it like this, you need to change the value from 2020 to the number of days since 1/1/1900 - only then it can be formatted. You can change the column value in M/SQL, or add new calculated column assigning the year to a given date, e.g. with DATE([YearFromSQL], 1,1)Stachu