Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Anonymous

Slicing and dicing dates: A practical guide to the Power BI Timeline Slicer

Introduction:

The Timeline slicer is a graphical date range selector used as a filtering component in Power BI. In many cases we need to filter data for date ranges or at a higher level, such as month or quarter. Filtering is a pain when you have to click through tons of date values to select the range you want. Even changing the granularity of the filter (from monthly to quarterly to yearly) is very tedious. The Timeline slicer will make this tedious operation easy!

You just click and drag to the range you want! You can also switch to a yearly, quarterly or monthly or even weekly view to select a higher level of scope than dates. You can also set the look and feel of the report from the formatting options to make it more suitable for your report. Now, let's start the Timeline slicer experience!

Sample Data:

Let's take the 2014 Amarilla sales figures for Canada as an example. The screenshot below shows some of the data, refer to the attached excel for specific data.

vjingzhanmsft_0-1719564643549.png

Steps:

Preliminary preparation: Timeline Slicer visual is a custom visual, so you need add it in Get more visuals. Then you can see the Timeline Slicer displayed in Visualizations.

vjingzhanmsft_4-1719564740042.pngvjingzhanmsft_5-1719564747810.png

Introduction to visual properties:

Force selection:

Current period: If the granularity selected is “Year”, the current year is displayed.

Latest available period: If the granularity selected is “Month”, the latest available month is displayed.

vjingzhanmsft_6-1719564771948.png

Week Determination Standards:

Using this tab, you can change the week's standard to either none or ISO 8601. ISO 8601 is an international standard covering the worldwide exchange and communication of date and time-related data.

vjingzhanmsft_7-1719564817150.png

Fiscal Year:

This tab changes the start date of the fiscal year.  For example , the current fiscal year is set for November 20th, that means it is from November 20th as the first day of the fiscal year. The timeframe in the example is the entire year 2014. Q1 is from January 1st to February 19th, Q2 is from February 20th to May 19th, and so on. The final November 20, 2014 to December 31, 2014 becomes Q1 of 2015.This is the setup for the fiscal year.

This feature will become very convenient for finance when it comes to statistics, instead of having to use formulas to calculate by fiscal year.

vjingzhanmsft_8-1719564836203.png

vjingzhanmsft_9-1719564847687.png

First Day Of Week:

Using this tab to change the day you'd like the Slicer's week to start.  With the screenshot, you'll notice that when you set a different first day of the week, the return time is different when you select the first week.

vjingzhanmsft_10-1719564871939.png

vjingzhanmsft_11-1719564886025.png

vjingzhanmsft_12-1719564912234.png

vjingzhanmsft_13-1719564921236.png

Range Header:

Using this tab, you can change the Range Header's font color and size. You can also toggle the Range Header off. Also, you'll notice that the Range Header display changes when you select a different time granularity. The current selection is Quarterly, so the display is also Quarterly.

vjingzhanmsft_14-1719564956414.png

vjingzhanmsft_15-1719564964616.png

Cells:

Using this tab allows you to change the color of the selected and unselected cells.

vjingzhanmsft_16-1719564982331.pngvjingzhanmsft_17-1719564990212.png

Granularity:

Using this tab allows you to change the color of the granularity scale and its slider. You can also turn off granularities you do not want available in your Slicer.

vjingzhanmsft_18-1719565014512.pngvjingzhanmsft_19-1719565021184.png

Labels:

Using this tab allows you to change the labels' font color and size. Turning off the Display all causes only the label of the granularity chosen to be shown.

vjingzhanmsft_20-1719565038390.pngvjingzhanmsft_21-1719565044716.png

Scroll position auto adjustment:

Turning on this option automatically adjusts the Slicer view (scroll position) whenever a change is made to the selection.

vjingzhanmsft_22-1719565063540.png

 

Configuration:

1. Import the excel data and create a clustered column chart and Timeline Slicer to show different sales at different time granularities.

2. Drag the date column to Time in the Timeline Slicer. Also drag the date column to the X-axis of the clustered column chart, the sales column to the Y-axis, and the product to Legend.

vjingzhanmsft_23-1719565083138.png

vjingzhanmsft_24-1719565117008.png

3. As you can see, another slider above the Timeline Slicer allows you to filter your data by year, quarter, month, week, or day. To its right, you can see a date range showing the time period currently selected by the Slicer.

vjingzhanmsft_25-1719565139510.png

4. The time granularity on the Timeline Slicer is categorized into year, quarter, month, week, and day. clustered column charts change as the time granularity is switched.

Year

vjingzhanmsft_26-1719565168733.png

Quarter

vjingzhanmsft_27-1719565184037.png

Month

vjingzhanmsft_28-1719565199334.png

Week

vjingzhanmsft_29-1719565212507.png

Day

vjingzhanmsft_30-1719565225554.png

You can select the time range you want to filter by dragging the two semicircles. Also when you click on the Range Header, the time range below will become fully selected.

The above steps are the basic configuration of Timeline Slicer. Of course, you can also set some background color and font size for this visual through Format your visual. These are similar to regular visuals, so I won't go into details here.

vjingzhanmsft_31-1719565243118.png

I hope my blog will help you know how to use Timeline Slicer. Come and start your custom Timeline Slicer visual journey!

 

Author: Ailsa Tao

Reviewer: Ula and Kerry