Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hallo,
I would like to have one button to remove all projects that were done in last 30 days.
To do that I have added new conditional column in power query. I do not know why it doesn't work. Any idea?
= Table.AddColumn(#"Replaced Value8", "YYY", each if [Date] < Date.AddDays(DateTime.LocalNow(),-30) then "Wrong" else "Correct")
Solved! Go to Solution.
Hi., @jtomczyk ;
Because your [Date] column is in Date format and date.adddays (datetime.localnow (), -30) returns Date/Time format, the two formats are not comparable in power Query, so you cannot use <;
so we could change the Date column to Date/Time format . then compare them.
= Table.AddColumn(#"Changed Type1", "Custom", each if [Date]<Date.AddDays(DateTime.LocalNow(),-30) then "Wrong" else "Correct")
Or change the other column to Date format.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi., @jtomczyk ;
Because your [Date] column is in Date format and date.adddays (datetime.localnow (), -30) returns Date/Time format, the two formats are not comparable in power Query, so you cannot use <;
so we could change the Date column to Date/Time format . then compare them.
= Table.AddColumn(#"Changed Type1", "Custom", each if [Date]<Date.AddDays(DateTime.LocalNow(),-30) then "Wrong" else "Correct")
Or change the other column to Date format.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@jtomczyk , what we do is we had a filter in power query with the static date on the data then go and replace the static date with this one
Date.AddDays(DateTime.LocalNow(),-30)
Hallo @amitchandak
For the static date it works
when I replace that date with Date.AddDays(DateTime.LocalNow(),-30) I get error to all values
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 24 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 44 | |
| 32 | |
| 18 | |
| 17 | |
| 16 |