Forum Discussion
Kbrennan856
8 years agoFrequent Visitor
First Day of week
Hi, My week runs Saturday to Friday, is there a way in dax i can get the week no and year? as currently i only have the option in dax for Sunday to monday
Anonymous
8 years agoNot applicable
Hi Kbrennan856,
You can use below formula to get Week Number from Saturday to Friday.
Calculate column formula:
weeknum =
VAR _calendar =
FILTER (
ADDCOLUMNS ( 'Calendar', "WeekDay", WEEKDAY ( [Date], 1 ) ),
YEAR ( [Date] ) = YEAR ( EARLIER ( [Date] ) )
)
RETURN
COUNTROWS (
FILTER ( _calendar, [Date] <= EARLIER ( [Date] ) && [WeekDay] = 7 )
)
+ 1
Regards,
Xiaoxin Sheng