Display name shows earliest day of the week for the current table.

Hi, I’m currently making a table view that will show the data for the specified week (note it’s modified to make the week begin with Monday, rather than Sunday).

I have another table view that shows the data for the current day and I have the display name set to this:

CONCATENATE("Grapevine Card Tips - “, INDEX(LIST(“Sun”, “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”), WEEKDAY(TODAY())),” ",TODAY())

Which looks like: Grapevine Card Tips - Sun 04/30/2023. Obviously this is extremely easy to accomplish for the current day..

I was wondering if it would be possible to create a formula for the display name that would function the same but would say: Grapevine Card Tips - Week of Mon 04/24/2023. I’m not sure how I would do this. (Also note the data for the table is a slice that will only show rows from Monday-Sunday of the current week).

It will also need to say Week of Mon MONDAY DATE regardless of the day, if that wasn’t clear. So if I check it on Friday, it will still say Week of Mon MONDAY DATE

That was miserable

CONCATENATE("Grapevine Card Tips - Week of ", INDEX(LIST(“January 2, 2023”, “January 9, 2023”, “January 16, 2023”, “January 23, 2023”, “January 30, 2023”, “February 6, 2023”, “February 13, 2023”, “February 20, 2023”, “February 27, 2023”, “March 6, 2023”, “March 13, 2023”, “March 20, 2023”, “March 27, 2023”, “April 3, 2023”, “April 10, 2023”, “April 17, 2023”, “April 24, 2023”, “May 1, 2023”, “May 8, 2023”, “May 15, 2023”, “May 22, 2023”, “May 29, 2023”, “June 5, 2023”, “June 12, 2023”, “June 19, 2023”, “June 26, 2023”, “July 3, 2023”, “July 10, 2023”, “July 17, 2023”, “July 24, 2023”, “July 31, 2023”, “August 7, 2023”, “August 14, 2023”, “August 21, 2023”, “August 28, 2023”, “September 4, 2023”, “September 11, 2023”, “September 18, 2023”, “September 25, 2023”, “October 2, 2023”, “October 9, 2023”, “October 16, 2023”, “October 23, 2023”, “October 30, 2023”, “November 6, 2023”, “November 13, 2023”, “November 20, 2023”, “November 27, 2023”, “December 4, 2023”, “December 11, 2023”, “December 18, 2023”, “December 25, 2023”), WEEKNUM(TODAY()-1)))

1 Like

You solved a good one. Instead of the long expression, you could try a much shorter and flexible expression such as below

CONCATENATE("Grapevine Card Tips - Week of ",IF(WEEKDAY(TODAY())=1, EOWEEK(TODAY()-1)-5, EOWEEK(TODAY())-5))

This expression will work for all years -in the past, current and future.

EOWEEK() - AppSheet Help

Also your expression will not work for edge cases when the year changes due to the way WEEKNUM() works. I believe your expression will not work for 1/1/2023 for example. On the other hand, EOWEEK() works consistently during rollover of years as well.

1 Like

Thank you, this was the simplified solution I was seeking. I struggle to create simple expressions because my understanding isn’t that great but I usually make it work haha.

You are welcome. Yes, your expression is also almost close. Keep it up :+1: