Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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"