Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello Everyone,
I am new to this so I require some help.
Because I add my data on the first days of next month I want to create a column Query that will mark all dates that are smaller than the first day of the current month to be marked as past and all the dates in the current month and onward to be marked as future
So this is what I tried which is wrong as I received an error in my column
=if [date] < Date.StartOfMonth(DateTime.LocalNow()) then "Past" else "Future"
So for example now we have February, I want in the new column all dates before the 01/02/2024 to be marked as past
Thanks for your time
Solved! Go to Solution.
The issue is with DateTime.LocalNow(), because it is as datetime - just add Date.From before it.
if Date.From([date]) < Date.StartOfMonth(Date.From(DateTime.LocalNow())) then "Past" else "Future"
The issue is with DateTime.LocalNow(), because it is as datetime - just add Date.From before it.
if Date.From([date]) < Date.StartOfMonth(Date.From(DateTime.LocalNow())) then "Past" else "Future"