Hi @bbsin
Edited: Added to get Start and end date for each dropdown option.
1. Place dropdown and set the Items property to
["This Week","This Month","Previous Month","Next Month"]
2. Set Onchange property of Dropdown to (Change to your dropdownname instead of Dropdown6)
If(
Dropdown6.Selected.Value = "This Month",
Set(
CalculatedStartdate,
DateValue(Month(Now()) & "/1/" & Year(Now()))
);
Set(
CalculatedEnddate,
Today()
)
);
If(
Dropdown6.Selected.Value = "Previous Month",
Set(
CalculatedStartdate,
DateValue(Month(Now()) - 1 & "/1/" & Year(Now()))
);
Set(
CalculatedEnddate,
DateAdd(
DateValue(Month(Now()) - 1 & "/31" & "/" & Year(Now())),
-1,
Days
)
)
);
If(
Dropdown6.Selected.Value = "Next Month",
Set(
CalculatedStartdate,
DateValue(Month(Now()) + 1 & "/1/" & Year(Now()))
);
Set(
CalculatedEnddate,
DateAdd(
DateValue(Month(Now()) + 1 & "/31" & "/" & Year(Now())),
-1,
Days
)
)
);
If(
Dropdown6.Selected.Value = "This Week",
Set(
CalculatedStartdate,
DateAdd(
Now(),
-(Weekday(
Now(),
StartOfWeek.MondayZero
)),
Days
)
);
Set(
CalculatedEnddate,
DateAdd(
Now(),
6-(Weekday(
Now(),
StartOfWeek.MondayZero
)),
Days
)
)
);
3. Gallery Items property to
SortByColumns(
Filter(
AdminEventInfo,
StartDate > CalculatedStartdate && EndDate < CalculatedEnddate
),
"Title",
If(
SortDescending1,
Descending,
Ascending
)
)