Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I have imported a calendar table from dataflows, the calendar goes up to year 2028, how do I filter it in Power Query to show dates only up to current date, not into the future?
Solved! Go to Solution.
Select the date column, click on the right corner to filter it and choose the "Before" type filter and then input a specific date. If you strictly want only dates from today and before (which I don't recommend) you'll need to add a custom column that gets today's date (Date.From(DateTime.LocalNow())) and then create a conditional flag column that compares the date column against today (if date <= today column then 1 else 0). Use then the flag column to remove the 0s.
Proud to be a Super User!
Select the date column, click on the right corner to filter it and choose the "Before" type filter and then input a specific date. If you strictly want only dates from today and before (which I don't recommend) you'll need to add a custom column that gets today's date (Date.From(DateTime.LocalNow())) and then create a conditional flag column that compares the date column against today (if date <= today column then 1 else 0). Use then the flag column to remove the 0s.
Proud to be a Super User!
Thank you, and what is the reason you do not recommend today to before?
It's great that you are removing dates, since 2028 is still far away- Strictly using today and before limits you advanced time-intelligence analysis. For example, if you want to do forecasting, parallel periods, what if scenarios, etc. Filtering from today to before is understandable in a transactional table but not on a Calendar/dimensional table. I would just keep from the end of 2024 and before. Just my thoughts 🙂
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |