Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi there,
I'm trying to filter a 'pure' date column in power query (formatted as date, without the time).
I need to filter the dates to only include entries from 01/01/2018 until the end of the current month (this part has to stay dynamic).
I tried various combinations, but can't get it to work.
Could someone please help?
Thanks,
Nigel
Solved! Go to Solution.
The challenge is to properly convert between data types Date and DateTime:
= Table.SelectRows(#"previousStep", each [Date] >= #date(2018, 1, 1) and [Date] <= Date.EndOfMonth(DateTime.Date(DateTime.LocalNow())))
The challenge is to properly convert between data types Date and DateTime:
= Table.SelectRows(#"previousStep", each [Date] >= #date(2018, 1, 1) and [Date] <= Date.EndOfMonth(DateTime.Date(DateTime.LocalNow())))
Hi there,
Thanks very much. It worked perfectly.
What if the field is a DateTime?
Much appreciated.
It's pretty much the same. Just make sure to convert your filter criteria according to the columns data type.
Date to DateTime: DateTime.From(#date(2018, 1, 1))
DateTime to Date: DateTime.Date(DateTime.LocalNow())
https://learn.microsoft.com/en-us/powerquery-m/datetime-date
https://learn.microsoft.com/en-us/powerquery-m/datetime-from
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
70 | |
68 | |
43 | |
34 | |
26 |
User | Count |
---|---|
86 | |
50 | |
45 | |
38 | |
38 |