Forum Discussion

kowalewski92's avatar
kowalewski92
Frequent Visitor
8 years ago

How can I filter data from datetime to datetime?

Dears,

I have the question that you can see in the subject - How can I filter data from datetime to datetime?. I want to filter date from YYYY-MM-DD HH:MM to YYYY-MM-DD HH:MM. Is it possible? I have to show car routes history on the map and I need it.

 

I please you also to send me instruction for other filter ways if descibed above is not possible.

 

Thank you.

8 Replies

    • stretcharm's avatar
      stretcharm
      Memorable Member

      In the Query editor you can goto the filter icon on the column header. Select the Date/Time Filters menu and then custom

       

      You can then add a range.

       

       

      The M code looks like this

       

          #"Filtered Rows" = Table.SelectRows(#"Expanded Executables", each [StepEnd] >= #datetime(2017, 10, 17, 19, 45, 0) and [StepEnd] < #datetime(2017, 10, 17, 19, 55, 0))
      in
          #"Filtered Rows"

      Against a page/report or visualisation you can use the advanced filtering

       

       

      I don't know an easy way of doing slicers to filter datetimes.

       

      Phil

  • kowalewski92

    May be I didnot get you exactly. Do you want to filter the data based on DATETIME field..?

    You can drop the column into a slicer directly or create a column.