How to Add Time Slicer in Power BI
Filtering a Power BI report by date is one of the most fundamental requirements for any dashboard, and the built-in slicer is the perfect tool for the job. A well-designed time slicer can transform a static report into an interactive and dynamic analysis tool. This tutorial will walk you through exactly how to add, format, and customize date and time slicers to empower your users and make your data more accessible.
What is a Slicer in Power BI?
Before jumping into the specifics of time slicers, let's quickly cover what a slicer is. In Power BI, a slicer is a type of on-page visual that allows you to filter the other visuals in your report. Instead of using the Filters pane, which can be less intuitive for an end-user, slicers provide an obvious and interactive way to narrow down the data presented in charts, tables, and cards. You can create slicers for almost any column in your data model, like product categories, sales regions, or customer names. However, the most common and powerful use case is undoubtedly filtering by date and time.
Why Use a Time Slicer? The Big Benefits
Adding a time slicer to your report does more than just add a cool-looking filter. It fundamentally changes how people interact with your data.
- Empowers End-Users: It turns passive report viewers into active analysts. They can self-serve to find answers to their own questions, like comparing this quarter's performance to last quarter's or isolating data from a specific marketing campaign period.
- Improves Usability: A time slicer is far more user-friendly than digging through the Filters pane. A visual calendar, a slider, or a dropdown list are intuitive ways for anyone, regardless of their Power BI skill level, to interact with the dashboard.
- Saves Time and Effort: Instead of creating dozens of report pages for different timeframes (e.g., a "Last 7 Days" report, a "Last 30 Days" report), you can create one dynamic report page that the user can control. This dramatically simplifies your report design and maintenance.
Step-by-Step Guide: How to Add Your First Time Slicer
Ready to build one? The process is very straightforward. For this example, let's assume you have a sales dataset with an 'OrderDate' column that you want to filter by.
Prerequisite: Make Sure You Have a Proper Date Column
This is the most crucial step. For a time slicer to work correctly, the column you use must be recognized by Power BI as a date or date/time data type. You can check and set this in the Power Query Editor or in the 'Data' view by selecting the column and using the 'Data type' dropdown in the 'Column tools' tab. While you can use a date column from your main data table (like your sales table), the best practice is to have a dedicated 'Date Calendar' table in your data model. This provides a stable, complete list of dates for filtering and makes more advanced time intelligence calculations (like year-over-year comparisons) much easier down the road.
Step 1: Select the Slicer Visualization
On your report canvas, find the Visualizations pane on the right-hand side. Click on the Slicer icon (it looks like a small funnel). This will place an empty slicer template onto your report canvas. You can drag and resize it as needed.
Step 2: Add Your Date Field to the Slicer
With the new slicer visual selected, find your date column in the Data pane. In our example, we'll use 'OrderDate'. Drag this date field and drop it into the 'Field' well in the Visualizations pane for your new slicer. Instantly, Power BI will detect that it's a date field and will likely create a slicer with a 'Between' style slider by default.
Step 3: Choose Your Slicer Style
A date slicer offers several powerful formatting options. To change the style, select the slicer, go to the Format your visual tab (the paintbrush icon) in the Visualizations pane, and open Slicer settings > Options. Under 'Style', you’ll see a few choices:
- Between: The default option. This gives the user two date input boxes (a start and end date) with a slider. It's great for selecting custom date ranges.
- Before: Provides a single date picker to show all data on or before the selected date. Useful for viewing cumulative data up to a certain point.
- After: The opposite of 'Before'. It provides a single date picker to show all data on or after a selected date.
- List: Displays all distinct dates in your column as a selectable list. This can be very long and clunky for large date ranges, so it's best used when you only have a few specific dates (e.g., event dates).
- Dropdown: Similar to a list, but compressed into a dropdown menu to save space on your report. Again, this works best for shorter ranges.
- Relative Date: (We'll cover this in-depth in a moment, as it's one of the most powerful options).
- Relative Time: Functions just like the Relative Date slicer but for time values (hours, minutes). Play around with these styles to see which one best fits the goal of your report.
Advanced Slicer Type: The Relative Date Slicer
The 'Between' slicer is good, but the real power for business reporting often lies in the Relative Date slicer. This style lets you filter your data based on dynamic, floating timeframes relative to today. To use it, follow the steps above but select Relative Date under the 'Style' dropdown. You'll now see new options appear that let users filter based on:
- Last/Next/This: Choose a reference point.
- Number: Enter a numerical value (e.g., 7, 30, 90).
- Unit: Choose from Days, Weeks, Months, Years, and their 'Calendar' equivalents (Calendar weeks/months/years run from the start to the end of the period). With this, a user can easily filter the report to show:
- The Last 30 Days
- The Next 2 Quarters
- This Month This is a game-changer because the report automatically updates. When you view the "Last 7 Days" report next week, the date range will have automatically shifted forward without you touching a thing.
Creating Multi-Level Filtering with a Date Hierarchy Slicer
What if you want to let users filter by Year, then by Quarter, then by Month? A date hierarchy slicer is the perfect solution. Power BI makes this simple. When you use a date field, Power BI often creates a hidden date hierarchy automatically. You can see this by clicking the small arrow next to your date field in the Data pane, which expands to show Year, Quarter, Month, and Day. To use this in a slicer:
- Create a new Slicer visual.
- Instead of dragging the whole date field, drag the top-level 'Year' field into the 'Field' well. Now drag 'Quarter' and drop it underneath 'Year', and do the same for 'Month'.
- By default, this will be in 'List' mode. Now, on your report canvas, you'll see a slicer with years. Users can click the little chevron arrows next to each year to expand it and select specific quarters or months within that year. This provides an incredibly intuitive drilling experience for your users without cluttering up the report with three separate slicers.
Formatting and Best Practices for Polish
A functional slicer is good, but a well-formatted one is even better. Here are a few tips to make your time slicers clean, clear, and professional.
- Give it a Clear Title: Go to Format visual > Slicer settings and make sure the title accurately describes what the user is filtering (e.g., "Select Order Date Range").
- Adjust Fonts and Colors: Under the Format visual tab in sections like 'Values' and 'Slicer header', you can adjust font sizes, colors, and backgrounds to match your company's branding and ensure readability.
- Use the "Select all" Option Wisely: In the Slicer settings, you can add a "Select all" option. This is great for list and dropdown slicers, as it gives users an easy way to reset their view to all data.
- Don't Overwhelm: Less is often more. For most executive dashboards, a 'Relative Date' slicer or a simple 'Between' slicer is more effective than a long, confusing list of individual dates. Think about what questions your audience is trying to answer and provide the tools that help them get there the fastest.
Final Thoughts
Mastering time slicers is a fundamental Power BI skill that elevates your reports from static displays to interactive tools for exploration. By understanding the different slicer types, like the versatile 'Between' slider, the time-saving 'Relative Date' filter, and the multi-level 'Hierarchy' viewer, you can provide an exceptional user experience that lets anyone find the insights they need. While Power BI offers deep customization, we know that getting insights quickly is often the most important thing. We built Graphed because we wanted to skip the manual setup and get straight to the answers. Instead of building visuals, formatting slicers, and publishing reports, you can just ask in plain English, like "create a dashboard showing new vs returning users from last quarter," and the AI analyst handles the data connection, visualization, and filters for you instantly.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.