Forum Discussion
Anonymous
4 years agoNot applicable
Returning first working date per week
Hello Community, Hope you are well. I have the below calendar table. I need to add a calculated column returning the first working date per week. Any help more than welcomed. DateYear...
- 4 years ago
If you want a date for each row, then try
FirstWorkdayOfWeek = CALCULATE ( MIN ( 'Calendar'[Date] ), ALLEXCEPT ( 'Calendar', 'Calendar'[Year], 'Calendar'[Week of Year] ) )This takes the minimal date in the calendar table for the Year and Week of Year combination in that particular row.
tamerj1
Community Champion
4 years agoHi Anonymous
Try
MyColumn =
CALCULATE (
VALUES ( 'Calendar'[Working/Weekend] ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Year-Week] = EARLIER ( 'Calendar'[Year-Week] )
&& 'Calendar'[Working/Weekend] = EARLIER ( 'Calendar'[Working/Weekend] )
),
'Calendar'[Date] = MIN ( 'Calendar'[Date] )
)