Forum Discussion
Column reference to 'Date' in table '' cannot be used with a variation 'Year' because it doe not hav
- 1 year ago
Hello some_analyst ,
The error occurs because the 'Date' column in your Date_DIM table doesn't have a Year variation after marking it as a Date Table. Ensure that 'Date_DIM'[Date] is of Date data type. If the Year column was removed after marking the table, recreate it using Year = YEAR('Date_DIM'[Date]). Modify your measures to use YEAR('Date_DIM'[Date]) instead of 'Date_DIM'[Date].[Year]. Also, check if the Date Table is correctly marked in Model View by right-clicking Date_DIM, selecting Mark as Date Table, and choosing the 'Date' column. Finally, restart Power BI and refresh the dataset to apply schema changes.
Thanks,
PankajIf this solution helps, please accept it and give a kudos, it would be greatly appreciated.
Hello some_analyst ,
The error occurs because the 'Date' column in your Date_DIM table doesn't have a Year variation after marking it as a Date Table. Ensure that 'Date_DIM'[Date] is of Date data type. If the Year column was removed after marking the table, recreate it using Year = YEAR('Date_DIM'[Date]). Modify your measures to use YEAR('Date_DIM'[Date]) instead of 'Date_DIM'[Date].[Year]. Also, check if the Date Table is correctly marked in Model View by right-clicking Date_DIM, selecting Mark as Date Table, and choosing the 'Date' column. Finally, restart Power BI and refresh the dataset to apply schema changes.
Thanks,
Pankaj
If this solution helps, please accept it and give a kudos, it would be greatly appreciated.
Thanks pankajnamekar25 , the issue seemed to be a relationship between a date from the table (date time format) and dim date . Strange, because that date time format I missed and it worked until now with refreshes.
I changed tha SimDate.Date.Year to Dim.Year and it seems to show fine