Forum Discussion
Week of the Month (Calculated Column)
- Anonymous7 years ago
Oops my mistake, I misread.
WeekStarting = DimDate[Date] - WEEKDAY(DimDate[Date]) + 1
- Anonymous7 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.
AnonymousThanks, Yes, I'm doing that in DAX.
Your solution gives me the number of week, which I already have in column Day_Wk_Num.
What I'm looking for is what I have in column "Week_Of", which is basically the date of each week begining date, repeating for each day of that week.
Oops my mistake, I misread.
WeekStarting = DimDate[Date] - WEEKDAY(DimDate[Date]) + 1
- sabeensp7 years ago
Helper IV
Anonymousso, it is sort of working, but it is starting from Sunday, our work week starts from Monday through Sunday. I have a week day column 1 through 7 in there.
Sorry, I'm new to DAX. I do appreciat eyour help.
- Anonymous7 years agoNot applicable
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.
- sabeensp7 years ago
Helper IV
Thanks, apprecite your help.