Forum Discussion

some_analyst's avatar
some_analyst
Icon for Helper I rankHelper I
1 year ago
Solved

Column reference to 'Date' in table '' cannot be used with a variation 'Year' because it doe not hav

I have been workinbg on a dashboard that was already created and working.   I added some connections and Did not do any changes to my dim_date and I am getting the error:    "Column reference to ...
  • pankajnamekar25's avatar
    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,
    Pankaj

    If this solution helps, please accept it and give a kudos, it would be greatly appreciated.