Sub topic 7
What timelines are and when to use them
Prerequisites
This chapter assumes you can build a basic PivotTable from a range or an Excel Table. It also assumes you can drag fields into the Rows, Columns, Values, and Filters areas. You should know the difference between a text value that looks like a date and a true date value. You should also be comfortable with the ribbon and its contextual tabs, such as PivotTable Analyze.
What a timeline is
A timeline is a visual filter control made for one kind of field: dates. It is a horizontal bar that shows a scale of time. You click a period, or drag across several periods, and the connected PivotTable shows only the rows that fall inside that range.
A timeline belongs to a PivotTable, but it sits on the worksheet as a separate object. You can move it, resize it, and style it. It stays visible while you work, so the current date range is always shown on screen.
A timeline differs from a slicer in two ways:
- A slicer shows one button for each distinct item in a field. A timeline shows a continuous scale of time.
- A slicer selection can be any set of items, including items that are far apart. A timeline selection is always one unbroken range of dates.
The second point is the most important one when you choose between them. It is covered in more detail later in this chapter.
What a timeline replaces
Before timelines, you filtered dates in two ways.
- You put the date field in the Filters area (a report filter) and ticked individual dates in a drop-down list.
- You put the date field in Rows or Columns and used its field drop-down. Excel offers Date Filters there, such as Between, This Month, and Last Quarter.
Both approaches work, but both have costs. A report filter with hundreds of distinct dates is hard to use. Picking a range means ticking many boxes, or turning on multiple selection and ticking each date. The Date Filters menu is faster, but it opens a dialog, and the chosen range is hidden until you open the menu again.
A timeline fixes both problems. You select a range with one drag, and the selected range is always printed on the control.
How a timeline looks and behaves
A timeline has these parts:
- Header. It shows the field name by default. You can change this text later.
- Selection label. It shows the range you chose, for example "Jan - Mar 2025".
- Time level box. A drop-down at the upper right. It switches the scale between Years, Quarters, Months, and Days.
- Scroll bar. It moves along the full range of dates in your data.
- Time blocks. These are the clickable segments of the scale. Selected blocks are highlighted, and the selection has handles on both ends.
The diagram below shows how a click or a drag on the timeline reaches the PivotTable.
Note that the timeline filters the rows of source data. It does not just hide cells. Totals and subtotals are recalculated for the dates you selected.
A worked example
Suppose you have a sales table with these columns: Order Date, Region, Product, and Amount. You build a PivotTable with Region in Rows and the sum of Amount in Values.
Now you want to see only sales from the second quarter of 2025.
- Click any cell in the PivotTable.
- Open the PivotTable Analyze tab and choose Insert Timeline.
- Tick Order Date and click OK.
- Set the time level to Quarters.
- Click the block labeled Q2.
The PivotTable now shows Amount by Region for April through June 2025 only. If you want April through September, drag the right-hand handle of the selection one block to the right. The same PivotTable updates at once.
Inserting a timeline step by step is covered in a later chapter. Here the goal is to see what the control does so you can judge when it fits.
Time levels at a glance
The time level sets the size of each block on the scale. This changes how precisely you can select.
| Level | One block represents | Typical use |
|---|---|---|
| Years | A calendar year | Comparing long-term performance |
| Quarters | Three months | Quarterly reporting |
| Months | One calendar month | Monthly trends and seasonal checks |
| Days | One day | Short windows, such as a single week |
Changing the level does not clear the current selection. Excel keeps the selected range and shows it at the new scale. A range that does not line up with the new blocks may be rounded to whole blocks. Check the selection label after you switch.
Timeline or slicer: how to decide
You can also use a slicer on a date field if the dates are grouped. For example, you can group by Months and Years and then add slicers for each. This works, but the result is different.
A timeline is the better choice when:
- You want a continuous range, such as "from March to August".
- Your data covers many years and you need to scroll through it.
- You want to change the level of detail (years, then months, then days) without regrouping the PivotTable.
- You want the chosen range to be visible on the control itself.
A slicer is the better choice when:
- You need non-adjacent periods, such as every January across five years.
- The field is not a date. A timeline works only on date fields.
- You want to filter by a label such as Fiscal Quarter that is stored as text.
The key limit to remember is that a timeline selects only contiguous periods. If a report needs "January and July only", use a slicer on a month field instead.
Things a timeline does not do
Knowing the limits saves time later.
- It cannot filter text, numbers, or any non-date field.
- It cannot select two separate ranges at once.
- It uses the calendar year. It does not follow a custom fiscal calendar, so a fiscal year that starts in July will appear as ordinary calendar years and quarters.
- It is not available for every data source. A PivotTable built from a regular range or Excel Table supports it, but some older PivotTable types and some connections do not.
- It does not appear in very old versions of Excel. Timelines were added in Excel 2013.
One timeline, several PivotTables
A single timeline can control several PivotTables, as long as they share the same pivot cache. A pivot cache is the stored copy of the source data that a PivotTable reads. PivotTables created from the same source range or Table, with the copy-and-paste or "use the same data" approach, usually share one. This lets one date range drive a whole dashboard. Connecting them is covered in the chapter on Report Connections.
Common mistakes
- Expecting non-adjacent selection. The timeline always selects one block range. Use a slicer when you need gaps.
- Forgetting the level. At the Years level, a click selects a whole year. If you want a single month, change the level first.
- Using text dates. The command is disabled or the field is missing from the list. Convert the text to real dates.
- Ignoring the fiscal calendar. The scale is always calendar based.
- Blank dates in the field. Blank cells in the date column can block or confuse the control. Fill them or remove those rows before you insert the timeline.
Summary
A timeline is a date-only filter control that selects one continuous range and shows it on the worksheet. It is faster than report filters or the Date Filters menu for range selections. It is limited to real dates, contiguous ranges, and the calendar year. Use a slicer when you need separate periods or fiscal labels.
Exercise
A manager wants a PivotTable that shows sales for only January and July across 2023, 2024, and 2025. Can a timeline do this? If not, what would you use instead?
Show answer
No. A timeline selects only one continuous range of dates, and January and July are not adjacent. Add a Month field (for example by grouping the date field by Months, or by adding a helper column) and use a slicer on it. Then select January and July with multiple selection.
Exercise
Your Order Date column contains values like "2025-03-14" that are left-aligned in the cells, and Insert Timeline does not list the field. What is the most likely cause, and what would you check first?
Show answer
The values are probably text, not true dates. Left alignment is a sign of this. Check by applying a number format or using a formula such as =ISNUMBER(A2). If it returns FALSE, convert the column to real dates, for example with Data > Text to Columns or the DATEVALUE function, and refresh the PivotTable.