Forum Discussion

plerner's avatar
plerner
Advocate I
8 years ago
Solved

Filter query by date column

I am trying to reduce the amount of rows that Power BI querys from the database, so in the query editor I am adding a filter on a timestamp column from the data source. In the filter options i have c...
  • cwebb's avatar
    8 years ago

    This drives me nuts! I agree, I expect "is in the previous" to include the current month too.

     

    However you can do what you want. First of all, on the dropdown menu at the top of the column, choose Date Filters/Month/This Month. This will give you a filter that filters out all the data from the current month. Next, go to the Applied Steps pane and click on the gear-shaped icon next to the newly-created Filtered Rows step. This opens up a dialog that allows you to edit the step. You'll see a condition that says "is in month" equals "this month"; underneath it select the Or radio button and then add a new condition that is "is in previous 5 months". It should look like this:

     

     

    Click OK and you should be good.

     

    HTH,

     

    Chris