Forum Discussion

DNA's avatar
DNA
Frequent Visitor
8 years ago
Solved

Need DAX Statement relating to Week Numbers

I want to create a custom column by concatenating a few fields in my table using a DAX statement   Year Month Number Week of Year   Let's say I have the below values for each field   Year = 2...
  • Greg_Deckler's avatar
    8 years ago
    MyDate = CONCATENATE(CONCATENATE(YEAR([Date]),FORMAT(MONTH([Date]),"0#")),FORMAT(WEEKNUM([Date]),"0#"))

    DNA 

  • parry2k's avatar
    8 years ago

    Add new column with following expression

     

    Week = FORMAT(Table2[Year], "0000") & FORMAT(Table2[Month], "00") & FORMAT(Table2[Week], "00")