I'm trying to figure out how to get the date of the first working day from a given year and week number (i.e. 2020 week 43) - any thoughts?
Hi @TedM
Hard way here...
Create a table DATE with every dates of calendar on one column named "date".
Add a virtual column "_isoweeknum" with expression:
ISOWEEKNUM([date])
Add another virtual column "_year" with expression:
YEAR([date])
Then, you can use the expression:
INDEX(
ORDERBY(
FILTER("DATE",
AND(
[_year]=YEAR([_thisrow].[yourYearSelectionColumn]),
[_isoweeknum]=ISOWEEKNUM([_thisrow].[yourWeekNumSelectionColumn]),
WEEKDAY([date])=1
)
),
[date],
FALSE
),
1)
EDIT:minor correction to expression
Hi @Aurelien
Thanks for the "hard way"!
I've now found a way to achieve what I needed just using the week numbers and not the date.
Would you share your method?
Maybe something along the lines of:
"1/1/" & YEAR(date) + WEEKNUM( date ) * 7 - {offset}
Where offset would be defined as something like:
WEEKDAY( "1/1/" & YEAR( date ) )
User | Count |
---|---|
43 | |
30 | |
26 | |
14 | |
14 |