Best approach to filter view for only current week’s data

Hello,

I’m working on an AppSheet app and need some guidance on setting up a slice row filter condition to display only the records from current week.

Scenario:

  • I have a Tracker table with columns: ID (Unique Record Identifier), Last_Updated_Date (Date when the record was last updated) and other fields.
  • The goal is to display only the current week’s data in the view.
  • Records from previous weeks should not appear.

Request for Suggestions:

  • What is the best way to filter only current week’s records efficiently or the best row filter condition to achieve this in a slice?
  • Are there any performance considerations when implementing such a filter?
  • Would a security filter be better approach for this requirement?

I would be grateful for any advice based on your experience. Thanks in advance for your time and help!

Looking forward to your suggestions!

For your consideration: Add a custom search feature

1 Like

(EOWEEK([Last_Updated_Date]) = EOWEEK(TODAY()))

2 Likes

Yes, if there is a (potentially) large historical record and/or you want to ensure users cannot (vs should not) see the older rows. If you want to offer the user the option of seeing older rows, then no.

2 Likes

Your definition of week is not clear - if it is past seven days or current calendar week say Sunday to Saturday.

For Sunday to Saturday week , please try a filter expression of

EOWEEK(TODAY()) -6 >= [Last_Updated_Date]

For last seven days, please try an expression of

TODAY() -6 >= [Last_Updated_Date]

You could try slice filter as well as security filter. They have different uses.

With security filter the filtered out data does NOT reach the user’s device. So it is a security mechanism as well ( unintended data not reaching the user’s device). With slice, the entire table data reaches the user’s device. Security filters are also in general better in terms of app performance.

However if you use security filter on a table, and if you need filtered out data for some other view etc. in app it will not be available. For example in your case if you wish to show records of the previous week in some other view, you cannot do so. But with slice filter, you can have another slice to show previous week’s data.

3 Likes

How can we filter week data with 2 column combination ?
I have Set column being in 1,2,3,4 values for multiple rows and have create date.
I want to pull only the max value set on the app ?