Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Arvind_07
Contributor III
Contributor III

Date filter

Hi,

I have a custom calendar data. Week number and Month starting/end date is different. But i have the Date field which is linked to week number and month based on my calendar.

I want to apply the default filter where I can get last week Sunday's date on the Date field when I open the app on any day during the current week.

Is there a function to apply on the filter to get the last week Sunday's Date on the Date field?

P.S. I will be having the Dates from 2020 to Dec 2021 on my Dashboard

Attached is my calendar

 

Labels (5)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

The WeekStart() function will give you the Sunday date previous to the date supplied as a parameter.

So, WeekStart(Today()) will give you 3/21/2021.  WeekStart(Today()-7) will give you 3/14/2021.  (Note: Today is 3/23/2021)

You can setup a Sheet Action in the Sheet Properties panel of your default sheet bookmark.  Select Add Action, and choose "Select values in field" and enter WeekStart(Today()) or WeekStart(Today()-7), depending on which Sunday you are referring to.  

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

The WeekStart() function will give you the Sunday date previous to the date supplied as a parameter.

So, WeekStart(Today()) will give you 3/21/2021.  WeekStart(Today()-7) will give you 3/14/2021.  (Note: Today is 3/23/2021)

You can setup a Sheet Action in the Sheet Properties panel of your default sheet bookmark.  Select Add Action, and choose "Select values in field" and enter WeekStart(Today()) or WeekStart(Today()-7), depending on which Sunday you are referring to.  

Arvind_07
Contributor III
Contributor III
Author

Thank you Gary for the solution. Is it possible to sort the Week Number filter and Month filter values in an ascending order- Like W01 2020- WK52 2020 and then W01 2021- WK52 2021 and the same goes for Month(Like Jan 2020- Dec 2020, Jan 2021-Dec 2021. 

I have attached the Calendar file already which has this information.