@LaurensM
hello laurens! all very well?
I inserted your code in another problem I have,
I have a system that changes the fill of an icon to green and yellow in 3 conditions, daily, weekly and monthly. This condition applies from records saved in a list, which are answered in a form, which some of these records are monthly, daily and weekly.

What i have:
Diary turns yellow 7:00 A.M every day
Weekly turn yellow every Monday at 7:00 ---- ok!
Monthly turn yellow every 1st at 7:00 of every month
I believe I have only one detail to modify, but I haven't found a way yet
Switch(
ThisItem.Frequencia;
"Semanal"; With(
//Temp save current Monday 7am value
{wCurrentWeekly:DateAdd(Today(); -Weekday(Today();StartOfWeek.MondayZero);TimeUnit.Days)+Time(7;0;0)};
If(
Now() >= wCurrentWeekly &&
DateTimeValue(Label9.Text;"pt-BR") < wCurrentWeekly;
//Monday, currently 7AM or later & the label date is before Monday of this week 7AM - show Orange
Color.Orange;
//In all other cases show green
Color.Green
)
);
"Diario"....
"Mensal"...
I've tried numerous solutions but none of them work for my tests 😞