Forum Discussion

Harrisfil's avatar
Harrisfil
Icon for Helper I rankHelper I
1 year ago
Solved

Overlapping Weeks Between Months in Calendar Logic

Hello, I’m working on creating a custom week column in my calendar dataset and have encountered a challenge with weeks that span across months. Here’s a detailed explanation of the issue: The Issue...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Harrisfil ,

     

    I changed the arithmetic logic and you can check the new attachment.

    New WeekStart = IF(MONTH('DimDate'[WeekStart])<>MONTH([Date]),[WeekStart]+7,[WeekStart])
    
    New Weeknum = WEEKNUM([New WeekStart],1)

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.