Forum Discussion

sabeensp's avatar
sabeensp
Icon for Helper IV rankHelper IV
7 years ago
Solved

Week of the Month (Calculated Column)

Hello,   I have a Date Dimention table, in which I need to add calculated column (Week_Of) shown below in the image. I tried several IF Then else, but not beign able to do it so far. Can you please...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Oops my mistake, I misread.

     

    WeekStarting = DimDate[Date] - WEEKDAY(DimDate[Date]) + 1
  • Anonymous's avatar
    Anonymous
    7 years ago

    That's an easy enough change. WEEKDAY starts on Sunday by default, but you can change it to start on either Saturday or Monday by changing the second argument.

     

    WeekStarting = DimDate[Date] - WEEKDAY(DimDate[Date], 2) + 1

    Check out the documentation of WEEKDAY here.