Forum Discussion

marianamarques's avatar
marianamarques
Advocate I
9 years ago
Solved

Date table - Relationship

Hi all, Can you please help me to figure out why my date relationship is not working? I have the exact same format  as the one I have on my date table. Also I have created the relationship betw...
  • TomMartens's avatar
    9 years ago

    Hey,

     

    this can happen if the datatype of the columns that form the relationship is set to datetime, be aware that datatype does not mean format.

     

    If you use the DAX function CALENDAR() to create the timeframe of your calendar the default datatype for the date column is datetime, this means there is always a time part in the value of the date column:

     

    For this reason I always make sure that the data type of the date column is DATE (unless I need the timepart, but then I would almost create a separate time table).

     

    Check if both columns have the datatype DATE. If not maybe you need to create an extra column of this datatype and rebuild your relationship on these columns and also use these columns in your visualizations and slicers.

     

    Most of the time this already does the trick.

     

    Hope this helps