Hey everyone, hope you're all doing well.
The following code corresponds to the items property of a gallery that should display the next three upcoming birthdays. It works fine until we reach the end of the month, when it starts showing birthdays from the next month instead of only showing those from the current month.
For example, if I have birthdays on May 30th and none on the 31st, the gallery should only display up to May 30th and not start showing June birthdays.
In theory, it should be enough to add one more condition to the filter, but when I do that, I start seeing the birthdays from the 30th plus the same ones from May 1st and 2nd.
What I'm looking for is for the gallery to always show the next three upcoming birthdays from the current month only, without displaying next month's birthdays even when we've reached the end of the current month.
Any ideas?
Thanks!
With(
{
_Data:
AddColumns(
colUsers,
_Day,
Value(Last(Split(birthday, "/")).Value),
_Month,
Value(First(Split(birthday, "/")).Value)
)
},
FirstN(
Filter(
_Data,
_Month = Month(Today()) && _Day >= Day(Today())
),
3
)
)
WarrenBelz
172
Most Valuable Professional
stampcoin
94
mmbr1606
94
Super User 2025 Season 1