Forum Discussion

Unknowncharacte's avatar
Unknowncharacte
Helper III
2 years ago
Solved

Dataflow Calendar

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?
  • ray_aramburo's avatar
    2 years ago

    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.