Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Time intelligence does not work properly

Hello all,   I am trying to perform some time intelligence calculations. However I can't seem to get anything to work properly. I have a DateTable, and a SalesHistory fact table. I have a relations...
  • Anonymous's avatar
    Anonymous
    8 years ago

    First of all, great job providing the community with the tools needed to help you troubleshoot!

     

    My best guess is that your SalesHistory[InvoiceDate] is actually a datetime data type instead of just date.

     

    If you have a time portion in the date, it's highly unlikely that the InvoiceDate will match your calendar table...1/1/2018 5:03:14 AM is not the same as 1/1/2018 12:00:00 AM (which is what your calendar date will be).

     

    Don't just change the data type in Query Editor.  I've run into instances where this step didn't actually truncate the time properly.

    Highlight the [InvoiceDate] column, click on the transform tab, click on the highlighted Date button, and click "Date only".

    That should truncate the time portion off.