Forum Discussion

jfernand's avatar
jfernand
Frequent Visitor
9 years ago
Solved

Converting date into YYYYWW

Hi team,   I have a date in the 2017-01-01 format. I wanted to convert it into 201701 (week number 1 of the year 2017) I have used the formula Week Number = YEAR( Calendar(date) ) & WEEK( Cal...
  • Chihiro's avatar
    9 years ago

    I'd do it in this manner.

     

    Week Number =
    INT (
        CONCATENATE (
            YEAR ( 'Calendar'[Date] ),
            FORMAT ( WEEKNUM ('Calendar'[Date] ), "00" ) 
    )
    )