Sub topic 9
Inserting a timeline
A timeline is a filter control for date fields in a PivotTable. This chapter covers how to insert one, what Excel adds to the sheet, and what to check when the command doesn't work. Switching time levels and selecting ranges come in the next chapter.
Prerequisites
This chapter assumes you can:
- Build a PivotTable from a range or an Excel Table.
- Place fields in the Rows, Columns, Values, and Filters areas.
- Tell a true date value from text that looks like a date.
- Find contextual tabs on the ribbon.
It also assumes you've read the chapter on preparing a date field. Here we only check that the field is ready.
Before you start
Check three things first.
- Excel version. Timelines exist in Excel 2013 and later, including Microsoft 365. Excel 2010 has slicers but no timelines.
- A PivotTable, not a plain table. A timeline filters PivotTables and PivotCharts. An Excel Table or a normal range can have a slicer, but not a timeline.
- A true date column. The source data needs at least one column whose cells are real dates. The column must not contain text such as
"2026-03-14"stored as a string.
The date field does not have to be in the PivotTable layout. The timeline reads date fields from the PivotTable's source data, so you can filter by Order Date even if the PivotTable only shows Region and Sales.
Inserting the timeline
Follow these steps.
- Click any cell inside the PivotTable. The PivotTable Analyze tab (called Analyze in some versions) appears on the ribbon.
- On PivotTable Analyze, in the Filter group, choose Insert Timeline. You can also use Insert > Filters > Timeline. Both commands do the same thing.
- In the Insert Timelines dialog box, tick the date field you want, for example
Order Date. - Select OK.
Excel places the timeline on the sheet, floating above the cells. It is named Timeline1 by default, with the field name as its caption.
What the new control looks like
A new timeline shows all periods and filters nothing. Its parts are:
| Part | Where | What it does |
|---|---|---|
| Header | Top left | Shows the caption. You can hide it. |
| Selection label | Top, beside the header | Shows the selected range, such as `Jan 2025 - Jun 2025`. Shows `All Periods` when nothing is selected. |
| Clear Filter button | Top right | Removes the date filter. |
| Time level drop-down | Top right | Switches between Years, Quarters, Months, and Days. |
| Period bar | Middle | Shows the periods. Clicking a period selects it. |
| Scroll bar | Bottom | Moves through time when the data spans more periods than fit. |
The default time level is usually Months. Periods that contain data appear in a darker shade, and periods with no data appear lighter.
Setting the control's options
Click the timeline to select it. A contextual Timeline tab appears. In older versions it is called Timeline Tools > Options. These groups are useful right after insertion:
- Timeline: change the Timeline Caption, view or change the Timeline Name, and open Report Connections.
- Show: turn the header, selection label, scroll bar, and time level selector on or off.
- Timeline Styles: pick a color style.
- Arrange: use Bring Forward, Send Backward, the Selection Pane, and Align.
- Size: set the exact height and width.
The caption is only a label. The name is what VBA and the Report Connections dialog use, so choose a clear one such as tlOrderDate if you will have several timelines.
Inserting more than one timeline
The Insert Timelines dialog lists every date field it can find. You can tick several, and Excel creates one timeline for each. Each timeline filters independently. If you select Order Date in 2025 and Ship Date in 2026, the PivotTable shows only rows that meet both conditions.
This can surprise you. Two timelines on different date fields usually shrink the result more than expected, and rows with a ship date outside the range disappear even when the order date fits. Give each timeline a distinct caption so readers know which date each one controls.
Inserting a timeline when the PivotTable has a grouped date field
Excel 2016 and later group dates automatically when you drop a date field into Rows or Columns. You may see Years, Quarters, or Months as extra fields in the PivotTable. These generated fields are not date fields, so they don't appear in the Insert Timelines dialog. The timeline uses the original Order Date field.
A timeline works together with grouping. You can keep the PivotTable grouped by month and still filter with a timeline set to Quarters. The two don't conflict, because the timeline filters the source dates before the PivotTable groups them.
Edge cases and errors
| Symptom | Likely cause | Fix |
|---|---|---|
| **Insert Timeline** is greyed out | The active cell isn't in a PivotTable, or the sheet is protected | Click a PivotTable cell. Unprotect the sheet. |
| A message says the PivotTable has no date field | The source column holds text, or the PivotTable was built from a data type without dates | Convert the column to real dates, then refresh the PivotTable. |
| The dialog lists the date field you want, but not another you expected | That column contains text or blank cells | Clean the column, then refresh. |
| The timeline's period bar looks empty | The dates fall outside the current scroll position | Scroll the bar, or switch to a coarser time level. |
| The control inserts but changes nothing | It isn't connected to the PivotTable you are looking at | Open **Report Connections** and tick the PivotTable. |
A single text entry, a stray note, or a blank cell in the middle of the date column can stop Excel from treating the column as dates. If a column looks right but doesn't appear in the dialog, check for these. A quick test is to use Home > Number Format on the column. If values left-align and the format shows General or Text, they are not true dates.
After you correct the source, refresh the PivotTable with PivotTable Analyze > Refresh. The date field list updates, and you can retry the insert.
Moving and sizing the timeline
A timeline floats over the cells like a chart. Drag its border to move it. Drag a handle to resize it. Resizing changes how many periods are visible at once, because a wider control fits more months before the scroll bar is needed.
Two habits help:
- Keep the timeline outside the PivotTable's range. If the PivotTable grows when you refresh, a control placed too close can end up covering the data.
- Right-click the border and choose Size and Properties. Under Properties, choose Don't move or size with cells if you hide or resize rows and columns often. Otherwise the control may stretch with them.
Summary of the procedure
- Confirm the source column holds true dates.
- Click inside the PivotTable.
- Use PivotTable Analyze > Insert Timeline.
- Tick the date field and select OK.
- Name and caption the timeline so it is easy to identify.
- Check Report Connections if more than one PivotTable should respond.
Exercise
You click a cell in your PivotTable and open Insert Timeline. The dialog lists no date fields, although the source has an Order Date column that looks like dates. What do you check first, and what do you do after fixing it?
Show answer
Check whether the Order Date cells are true dates. Look for text values, blank cells, or numbers stored as text. They usually left-align, and the format shows General or Text. Convert the column to real dates, then refresh the PivotTable with PivotTable Analyze > Refresh, and open Insert Timeline again. The field should now be listed.
Exercise
A PivotTable shows Region in Rows and Sales in Values. Order Date is not in the layout. Can you still insert a timeline on Order Date? Why?
Show answer
Yes. A timeline reads the date fields from the PivotTable's source data, not from the fields placed in the layout, so the field only needs to hold true dates in the source.