Forum Discussion

ezequiel's avatar
ezequiel
Microsoft Employee
6 years ago
Solved

Create week number

Hi,   I have a data series starting on the week of 7/29/2019. I need a formula that flag with 1 to the first week (7/29/2019), 2 to the second week (8/5/2019) and so on.   How can I tell DAX to s...
  • jdbuchanan71's avatar
    6 years ago

    Hello ezequiel 

    Give this a try.

    Column = DATEDIFF ( DATE ( 2019 , 7 , 28 ), 'YourTable'[Date] , WEEK ) +1

    The +1 is on the end so the first 7 days don't come back as 0