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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I need to filter a table in PowerQuery for dates <= today.
As I have learned already this cannot be done within a wizard or so but must be done in M-Code.
I already have seen this thread:
Solved: Power Query Current Date Filter - Microsoft Power BI Community
This seemed to be the solution
let
#"Gefilterte Zeilen1" = Table.SelectRows(#"Gefilterte Zeilen", each [Nächster Termin] <= DateTime.LocalNow())
in
#"Gefilterte Zeilen1"
but then I get this error message:
Sorry - this is German.
But it is saying that < cannot be used for DateTime and Date.
What can I do?
Solved! Go to Solution.
Hi @cosmicyes ,
The data format are different. DateTime.LocalNow() return DateTime where your column data type is Date.
You can define the column to datetime before you apply filter to rows; or you can date Date.From() Date.From(DateTime.LocalNow())
Regards
KT
Hi @cosmicyes ,
The data format are different. DateTime.LocalNow() return DateTime where your column data type is Date.
You can define the column to datetime before you apply filter to rows; or you can date Date.From() Date.From(DateTime.LocalNow())
Regards
KT
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 6 | |
| 6 | |
| 6 |