Filter a gallery to show only dates in the next quarter.
Input
Calendar Dates is a SharePoint list with consecutive days starting 1/1/2018 and ending 12/31/2024 (2,557 rows)
Title | CalendarDate |
Monday, January 1, 2018 | 1/1/2018 |
Tuesday, January 2, 2018 | 1/2/2018 |
Wednesday, January 3, 2018 | 1/3/2018 |
Thursday, January 4, 2018 | 1/4/2018 |
Friday, January 5, 2018 | 1/5/2018 |
… | … |
Tuesday, December 31, 2024 | 12/31/2024 |
Code
Use this code in the Items property of a gallery.
With(
{
StartDate: Date(
Year(Today()),
Month(Today())
-If(
Mod(Month(Today())-1,3) = 0,
0,
Mod( Month(Today())-1, 3)
)+3,
1
),
EndDate: Date(
Year(Today()),
Month(Today()) + 3-Mod(Month(Today())-1,3)+3,
1
)-1
},
Filter(
'Calendar Dates',
CalendarDate >= StartDate,
CalendarDate <= EndDate
)
)
Output
Gallery shows only rows with a date in the next month. Current date is 6/16/2021.
Title | CalendarDate |
Thursday, July 1, 2021 | 7/1/2021 |
Friday, July 2, 2021 | 7/2/2021 |
Saturday, July 3, 2021 | 7/3/2021 |
Sunday, July 4, 2021 | 7/4/2021 |
Monday, July 5, 2021 | 7/5/2021 |
Tuesday, July 6, 2021 | 7/6/2021 |
Wednesday, July 7, 2021 | 7/7/2021 |
Thursday, July 8, 2021 | 7/8/2021 |
Friday, July 9, 2021 | 7/9/2021 |
Saturday, July 10, 2021 | 7/10/2021 |
Sunday, July 11, 2021 | 7/11/2021 |
Monday, July 12, 2021 | 7/12/2021 |
Tuesday, July 13, 2021 | 7/13/2021 |
Wednesday, July 14, 2021 | 7/14/2021 |
Thursday, July 15, 2021 | 7/15/2021 |
Friday, July 16, 2021 | 7/16/2021 |
Saturday, July 17, 2021 | 7/17/2021 |
Sunday, July 18, 2021 | 7/18/2021 |
Monday, July 19, 2021 | 7/19/2021 |
Tuesday, July 20, 2021 | 7/20/2021 |
Wednesday, July 21, 2021 | 7/21/2021 |
Thursday, July 22, 2021 | 7/22/2021 |
Friday, July 23, 2021 | 7/23/2021 |
Saturday, July 24, 2021 | 7/24/2021 |
Sunday, July 25, 2021 | 7/25/2021 |
Monday, July 26, 2021 | 7/26/2021 |
Tuesday, July 27, 2021 | 7/27/2021 |
Wednesday, July 28, 2021 | 7/28/2021 |
Thursday, July 29, 2021 | 7/29/2021 |
Friday, July 30, 2021 | 7/30/2021 |
Saturday, July 31, 2021 | 7/31/2021 |
Sunday, August 1, 2021 | 8/1/2021 |
Monday, August 2, 2021 | 8/2/2021 |
Tuesday, August 3, 2021 | 8/3/2021 |
Wednesday, August 4, 2021 | 8/4/2021 |
Thursday, August 5, 2021 | 8/5/2021 |
Friday, August 6, 2021 | 8/6/2021 |
Saturday, August 7, 2021 | 8/7/2021 |
Sunday, August 8, 2021 | 8/8/2021 |
Monday, August 9, 2021 | 8/9/2021 |
Tuesday, August 10, 2021 | 8/10/2021 |
Wednesday, August 11, 2021 | 8/11/2021 |
Thursday, August 12, 2021 | 8/12/2021 |
Friday, August 13, 2021 | 8/13/2021 |
Saturday, August 14, 2021 | 8/14/2021 |
Sunday, August 15, 2021 | 8/15/2021 |
Monday, August 16, 2021 | 8/16/2021 |
Tuesday, August 17, 2021 | 8/17/2021 |
Wednesday, August 18, 2021 | 8/18/2021 |
Thursday, August 19, 2021 | 8/19/2021 |
Friday, August 20, 2021 | 8/20/2021 |
Saturday, August 21, 2021 | 8/21/2021 |
Sunday, August 22, 2021 | 8/22/2021 |
Monday, August 23, 2021 | 8/23/2021 |
Tuesday, August 24, 2021 | 8/24/2021 |
Wednesday, August 25, 2021 | 8/25/2021 |
Thursday, August 26, 2021 | 8/26/2021 |
Friday, August 27, 2021 | 8/27/2021 |
Saturday, August 28, 2021 | 8/28/2021 |
Sunday, August 29, 2021 | 8/29/2021 |
Monday, August 30, 2021 | 8/30/2021 |
Tuesday, August 31, 2021 | 8/31/2021 |
Wednesday, September 1, 2021 | 9/1/2021 |
Thursday, September 2, 2021 | 9/2/2021 |
Friday, September 3, 2021 | 9/3/2021 |
Saturday, September 4, 2021 | 9/4/2021 |
Sunday, September 5, 2021 | 9/5/2021 |
Monday, September 6, 2021 | 9/6/2021 |
Tuesday, September 7, 2021 | 9/7/2021 |
Wednesday, September 8, 2021 | 9/8/2021 |
Thursday, September 9, 2021 | 9/9/2021 |
Friday, September 10, 2021 | 9/10/2021 |
Saturday, September 11, 2021 | 9/11/2021 |
Sunday, September 12, 2021 | 9/12/2021 |
Monday, September 13, 2021 | 9/13/2021 |
Tuesday, September 14, 2021 | 9/14/2021 |
Wednesday, September 15, 2021 | 9/15/2021 |
Thursday, September 16, 2021 | 9/16/2021 |
Friday, September 17, 2021 | 9/17/2021 |
Saturday, September 18, 2021 | 9/18/2021 |
Sunday, September 19, 2021 | 9/19/2021 |
Monday, September 20, 2021 | 9/20/2021 |
Tuesday, September 21, 2021 | 9/21/2021 |
Wednesday, September 22, 2021 | 9/22/2021 |
Thursday, September 23, 2021 | 9/23/2021 |
Friday, September 24, 2021 | 9/24/2021 |
Saturday, September 25, 2021 | 9/25/2021 |
Sunday, September 26, 2021 | 9/26/2021 |
Monday, September 27, 2021 | 9/27/2021 |
Tuesday, September 28, 2021 | 9/28/2021 |
Wednesday, September 29, 2021 | 9/29/2021 |
Thursday, September 30, 2021 | 9/30/2021 |