Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Do need a separate date table

I have a simple Date, and Count columns in my source data. I won't need to relate the data to any other tables or files.

 

Can I simply add Year, Month, MonthName, Week, WeekNum etc etc in the same table rather then building a separate date table and creating a relationship?

  • Hi, Anonymous 

    Yes, you can try using the format function to add Year, Month, MonthName, Week, WeekNum etc etc in the same table rather then building a separate date table and creating a relationship

    Year1 = FORMAT(Sheet1[Date],"yyyy") 
    
    Month = FORMAT(Sheet1[Date],"mm") 
    Monthname = FORMAT(Sheet1[Date],"mmmm") 
    Week = FORMAT(Sheet1[Date],"w") 
    Weeknum = FORMAT(Sheet1[Date],"ww") 

    https://learn.microsoft.com/en-us/dax/format-function-dax 

     

    Best Regards,
    Community Support Team _ Eason

     

4 Replies

  • lukiz84's avatar
    lukiz84
    Icon for Memorable Member rankMemorable Member

    You can, but then you are missing time intelligence features.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Oh what time intelligence features would i be missing?  If i add in all the date based columns, what else would i be missing?

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

    Yes, you can try using the format function to add Year, Month, MonthName, Week, WeekNum etc etc in the same table rather then building a separate date table and creating a relationship

    Year1 = FORMAT(Sheet1[Date],"yyyy") 
    
    Month = FORMAT(Sheet1[Date],"mm") 
    Monthname = FORMAT(Sheet1[Date],"mmmm") 
    Week = FORMAT(Sheet1[Date],"w") 
    Weeknum = FORMAT(Sheet1[Date],"ww") 

    https://learn.microsoft.com/en-us/dax/format-function-dax 

     

    Best Regards,
    Community Support Team _ Eason