Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

Working with dates from multiple tables

There were a few posts on this but none that hit exactly what I need.   I have two tables - both are migration dates but one table is for PC migration, the other is for a Person that is being migra...
  • Greg_Deckler's avatar
    10 years ago

    So, assuming that your date table does not have times and is in the format "yyyyMMdd", you should be able to create a new column in the table with the formula:

     

    FormattedMigrationDate = FORMAT([MigrationDate],"yyyyMMdd")

     

    Reference here: https://msdn.microsoft.com/en-us/library/ee634398.aspx

     

    Then you can relate that table and the date table.

     

    This is DAX, so this is in the data model.

     

    Depending on what you are doing, this may be OK and you can use "USERELATIONSHIP" and specify the correct relationship. If not, you may have to create multiple date tables. I'd have to see your data and data model to know for sure.