How to filter between two dates in Power BI?

Here’s a question from Louis:

A key user asked me to help create a report to dynamically filter contents of a Power BI table between two specific dates. Should be a no-brainer but for some reason i am having a difficult time here. Any ideas?

Step 1: Prepare your Power BI data

  • Open the Power BI Report Data View.
  • Pick your table from the Data pane and carefully look into its contents.
  • In our case, we will analyze a calculate table named Interviews by Date we create for this tutorial.

Note: As Time Intelligence is enabled, Power BI automatically created a time hierarchy for my calculated table:

Step 2: Add a table to your report

  • From the left hand side menu, hit the Report View button.
  • Add a New page to your report.
  • Now, from the Visualizations section, drag a Table visual into your canvas.
  • Next, from the right hand side Data Pane, drag the relevant fields into the table.
  • In our case i add the month and day fields as well as the number of Interviews.
  • Click your table columns header to sort the values as needed (chronologically in our case).

Step 3: Add a slicer to your report

  • Next, from the Visualization panel, add a slicer visual to the canvas and place it at the side of your table.
  • Drag the Date filed onto the slicer.
  • Under Slicer Settings || Options, make sure to select Between as the Slicer Type.

Step 4: Dynamically filter your data

  • Now, make sure to use the Slicer Date slider to filter out the data according to dates.

Not filtered:

Filtered:

In case of questions, feel free to ask using the comments.

Leave a Comment