Skip to main content
Solved

Lines of the last week

  • October 25, 2023
  • 2 replies
  • 16 views

Forum|alt.badge.img+5

Hello and thank you for considering to help me!

Every day, my Airtable is supplied with additional lines through an x ​​bias.

How can I create a view that only collects last week's rows?

I only manage to get the lines from 7 days ago and not all those from last week.

Any idea ? 🙂

Kindly

Best answer by Sho

Hi @Julien_Etoke ,
For example, this formula determines which week the date is compared to today.

SWITCH(WEEKNUM(TODAY())-WEEKNUM({Date}), 1,"Last Week", 0,"This Week", -1,"Next Week" )

If you filter this field to show only last week, then that view will always show only last week's records.

When a week begins on Monday, it is like this.

SWITCH(WEEKNUM(TODAY(), "Monday")-WEEKNUM({Start Date}, "Monday"), 1,"Last Week", 0,"This Week", -1,"Next Week" )

 

2 replies

Forum|alt.badge.img+21
  • Inspiring
  • Answer
  • October 25, 2023

Hi @Julien_Etoke ,
For example, this formula determines which week the date is compared to today.

SWITCH(WEEKNUM(TODAY())-WEEKNUM({Date}), 1,"Last Week", 0,"This Week", -1,"Next Week" )

If you filter this field to show only last week, then that view will always show only last week's records.

When a week begins on Monday, it is like this.

SWITCH(WEEKNUM(TODAY(), "Monday")-WEEKNUM({Start Date}, "Monday"), 1,"Last Week", 0,"This Week", -1,"Next Week" )

 


Forum|alt.badge.img+5
  • Author
  • Known Participant
  • October 25, 2023

Hi @Julien_Etoke ,
For example, this formula determines which week the date is compared to today.

SWITCH(WEEKNUM(TODAY())-WEEKNUM({Date}), 1,"Last Week", 0,"This Week", -1,"Next Week" )

If you filter this field to show only last week, then that view will always show only last week's records.

When a week begins on Monday, it is like this.

SWITCH(WEEKNUM(TODAY(), "Monday")-WEEKNUM({Start Date}, "Monday"), 1,"Last Week", 0,"This Week", -1,"Next Week" )

 


Thanks a lot, you are a machine !