Pass 10 weeks from existing weeknum()

Hi Guys

Is there a way to compute pass 10 week from now? The t=column is [TIMESTAMP] and the data to filter is [Employee ID]

Solved Solved
0 6 105
3 ACCEPTED SOLUTIONS

Thank you.

Please try a slice filter of 

AND(  DATE([INSPECT TIMESTAMP]) >=EOWEEK( TODAY()) -75

             DATE([INSPECT TIMESTAMP]) <=EOWEEK( TODAY()) -71

            )

for Monday to Friday dates 10 weeks back from current week.

 

Please try a slice filter of 

AND(  DATE([INSPECT TIMESTAMP]) >=EOWEEK( TODAY()) -76

             DATE([INSPECT TIMESTAMP]) <=EOWEEK( TODAY()) -70

            )

for Sunday to Saturday dates 10 weeks back from current week.

As per AppSheet standard, the week is considered from Sunday to Saturday. 

 

View solution in original post

Thank very but it work on this AND(DATE([INSPECT TIMESTAMP]) >=EOWEEK( TODAY()) -76,[INSPECT TIMESTAMP] <= NOW()). Mind to tell me what is the -70 and -76 mean?

This is the orginal suggested by appsheet AI itself

AND(TOTALHOURS(NOW() - [INSPECT TIMESTAMP])/24 <= 70, [INSPECT TIMESTAMP] <= NOW())

View solution in original post

In the expression below

EOWEEK( TODAY()) -76

EOWEEK( TODAY()) computes the date of Saturday in current week. 

A week has 7 days. So 10 weeks have 70 days.  So - 70 computes a date of Saturday 10 weeks ago.  And -76  -(70 +6 ) computes a date of Monday 10 weeks ago by subtracting 76 from EOWEEK( TODAY())

EOWEEK( TODAY()) -70 computes a date of Saturday 10 weeks ago by substracting 70 days( 1o weeks) from EOWEEK( TODAY()) which Saturday of current week.

So the entire expression gives dates of just one week 10 weeks ago. Your requirement did not clearly mention you are looking for all the dates in the past 10 weeks. So I restricted it to just 1 week ( 10 weeks ago). But on rereading your requirement it is somewhat clear that your are looking for all dates in the past 10 weeks. ๐Ÿ™‚ So your use of NOW() is correct.

 

View solution in original post

6 REPLIES 6

If you share some example of what your a looking at exactly with three four example dates , community could suggest a better solution.

I would like to filter INSPECT TIMESTAMP from current week backwards untill the pass 10 weeks. Mean this week is 28 so it will be until week 18 in the paste

desmond_lee_0-1689144397950.png

 

Thank you.

Please try a slice filter of 

AND(  DATE([INSPECT TIMESTAMP]) >=EOWEEK( TODAY()) -75

             DATE([INSPECT TIMESTAMP]) <=EOWEEK( TODAY()) -71

            )

for Monday to Friday dates 10 weeks back from current week.

 

Please try a slice filter of 

AND(  DATE([INSPECT TIMESTAMP]) >=EOWEEK( TODAY()) -76

             DATE([INSPECT TIMESTAMP]) <=EOWEEK( TODAY()) -70

            )

for Sunday to Saturday dates 10 weeks back from current week.

As per AppSheet standard, the week is considered from Sunday to Saturday. 

 

Thank very but it work on this AND(DATE([INSPECT TIMESTAMP]) >=EOWEEK( TODAY()) -76,[INSPECT TIMESTAMP] <= NOW()). Mind to tell me what is the -70 and -76 mean?

This is the orginal suggested by appsheet AI itself

AND(TOTALHOURS(NOW() - [INSPECT TIMESTAMP])/24 <= 70, [INSPECT TIMESTAMP] <= NOW())

In the expression below

EOWEEK( TODAY()) -76

EOWEEK( TODAY()) computes the date of Saturday in current week. 

A week has 7 days. So 10 weeks have 70 days.  So - 70 computes a date of Saturday 10 weeks ago.  And -76  -(70 +6 ) computes a date of Monday 10 weeks ago by subtracting 76 from EOWEEK( TODAY())

EOWEEK( TODAY()) -70 computes a date of Saturday 10 weeks ago by substracting 70 days( 1o weeks) from EOWEEK( TODAY()) which Saturday of current week.

So the entire expression gives dates of just one week 10 weeks ago. Your requirement did not clearly mention you are looking for all the dates in the past 10 weeks. So I restricted it to just 1 week ( 10 weeks ago). But on rereading your requirement it is somewhat clear that your are looking for all dates in the past 10 weeks. ๐Ÿ™‚ So your use of NOW() is correct.

 

Thank very much

Top Labels in this Space