Timeline in power bi is a type of visual or visualization technique, it is used to define a data in the type of precision with respect to time, such as roster or completion of any given project, etc, it uses Gantt style charts to display the visuals.
What is TimeLine Visual in Power BI?
Power BI Timeline is a custom visual that we need to download from the web to use, this is not a default visual available to use. Timeline visual is a kind of slicer we can use it to select multiple ranges of data values and see specific period visuals. Timeline visual can accept only “Date” values and anything other than date values cannot be applied to this slicer.
How to Import Timeline Visual to Power BI?
Since Timeline visual is not built-in visual to use we need to import from the market place. Click on the below link first.
Source: Power BI Timeline Slicer
This will take you to the market place web page. Click on “Get It Now”.
Hit Continue button in the next window this will take you to “Download Page” and click on “Download for Power BI”. This Power BI custom visual file will get downloaded to your computer folder.
Now open Power BI file, under visualization click on “Import From File”.
Now it will ask you to choose the downloaded file from the computer hard disk. Go to respective file directory and choose the file. After selecting the file hit on “Open” button.
In your Power BI file window, you will see the message stating “The visual was successfully imported into this report”.
Now you should see this visual under visualization list.
Create Timeline Slicer in Power BI
To work with Power BI Timeline visual slicer we need “Date” values with associated data. Below is the historical stock price for the past two years of one of the prestigious bank in India.
Copy and paste the data directly to Power BI or you can copy the data to excel file and then import to Power BI as Excel file reference. So you can download the excel workbook template from the below link which is used for this example.
I have directly uploaded the data to Power BI.
- Come back to “Report” view now.
- Insert power bi “Line Chart” from the visualization field.
- For this blank power bi line chart drag and drop “Date” column to “Axis” field and “Stock Price” column to “Values” field of Line Chart.
- For date click on “Down” arrow and choose “Date” as the option.
- Now we can see the Power BI line chart as shown below.
Since the data is too large we cannot see all the data here in the line chart, so by adding power bi timeline slicer we can configure the chart.
- Unselect the chart and insert Power BI “Timeline” custom visual that we have imported from the file.
- For this Power BI timeline visual, we need to drag and drop “Date” column to “Time” field of this visual.
- Now take a look at the Timeline slicer and how it looks.
This Timeline slicer can interact with the line chart earlier that we have created. In the above slicer, we can select particular months and line chart will show numbers only for selected months.
- I have selected Jan, Feb, and Mar under the 2018 year. Now, look at the line chart.
- Power bi Timeline slicer by default grouped into Year >>> Quarter >>> Month. We can change this under grouping in the same slicer only.
- Now I will choose “Quarter” and see how my Timeline slicer looks.
Since the “Quarter” is selected my Timeline slicer configured accordingly.
- Like this, we can configure the Timeline slicer by “Year, Quarter, Month, Week, and Day” wise.
Note: Power BI dashboard file can also be downloaded from the link below and the final output can be viewed.
Things to Remember
- Timeline is a custom visualization works like a filter or slicer.
- The Timeline can accept only Date values.
- We can configure the Timeline slicer by Year, Month, Quarter, Week, and Day.
This has been a guide to Power BI Timeline. Here we discuss how to import & create Power BI timeline slicer to select multiple ranges of data & see specific period visuals along with examples. You can learn more about Power BI from the following articles –