Hello I tried to write a program to count the custom weeks as days. I have a column with custom weeks but if there’s a followup number, than it should count these numbers.
The table are the weeks which needs to be counted (the followup weeks).
The code should be:
If next number is a followup number, then count the followup weeks. Otherwise if it’s 1 week than outcome is 1.
The numbers should be converted to a date.
See example below.
The yellow cell is the custom date.
2
There may be other ways to do this, but I think it’s reasonable to use a lambda to check if a week number follows on from the previous week:
=LET(Date,A2,
startWeek,B2,
endWeek,REDUCE(startWeek-1,Table1[Week],LAMBDA(a,c,IF(c=a+1,a+1,a))),
Date+7*(endWeek-startWeek+1))
1