Forum Discussion

yousseftb's avatar
yousseftb
Frequent Visitor
6 years ago
Solved

filter - last 14 days

Hello, I want to filter in a table in POWER QUERY the date column to have only the data of the last 14 days. I have tried to put the following:   = Table.SelectRows (_Data_sales, each [Date_Invoi...
  • AlB's avatar
    AlB
    6 years ago

    yousseftb 

    Looks like your column in in DateTime format. Let's convert it then. Try this:

     

    = Table.SelectRows (_Data_sales, each Number.From(Date.From(DateTime.LocalNow()) - Date.From([Date_Invoice])) <=14 )

     

    Please mark the question solved when done and consider giving kudos if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers