Transition Tables
This page shows what a transition table is, and when it helps: loading data whose column headers change.
The problem with changeable headers
Section titled “The problem with changeable headers”Excel tables, introduced in Excel 2007, make it much easier to organise a block of structured data and to refer to it in formulas. They have one limitation, though, which is that their header row holds fixed values. A table’s headers cannot be formulas, so they cannot change when something else in the workbook changes.
The worksheet below records a small media company’s subscriptions by month. The date in C1 drives the month-end dates across row 3, so changing that one cell updates every header:

The aim is to load rows 3 to 7 into Power Query and unpivot them, but two obstacles stand in the way:
- Turning the range into an Excel table would fix the headers as values, so the formulas in row 3 would stop working.
- Loading it as a named range would keep the formulas, but the query would break when the dates changed, because its steps refer to the column headers by name.
A transition table gets round both. It is a separate Excel table that lists stable period codes beside the formula-driven dates. The source data is labelled with the stable codes, so the query never sees a changing header, and a merge with the transition table brings the real dates back in.
1. Create the transition table
Section titled “1. Create the transition table”Create an Excel table like this one, with a period code and its date on each row:

Power Query needs a query for this table before it can merge with it:
- Select any cell in the table.
- Create a new query with From Table/Range.
- On the Home tab, click Close & Load To, and choose Only Create Connection.
2. Add the period codes to the source data
Section titled “2. Add the period codes to the source data”The source data now needs headers in the same CYM form:
- Insert a new row below row 3.
- Copy the values in the transition table’s Period column, and paste them into the new row with Paste Special, ticking Transpose.

Next, make a table from rows 4 to 8, leaving row 3 outside it so that its formulas keep working:
- Click inside the data, and on the Insert tab click Table.
- Change the range to =$B$4:$N$8.
- Click OK, and name the table Customer_Data.
- Hide row 4.
The worksheet looks as it did before, but the data below the dates is now a table with fixed headers:

3. Merge the two tables
Section titled “3. Merge the two tables”- Click inside the Customer_Data table and create a new query with From Table/Range.
- Right-click the first column and choose Unpivot Other Columns.
The Attribute column now holds the period codes, which can be matched against the transition table:
- On the Home tab, click Merge Queries.
- Choose the transition table as the second table.
- Select the Attribute column in the first table and the Period column in the second, and click OK.
- Expand the new column, taking only the Date field and unticking the option to use the original column name as a prefix.
- Right-click the Date column and choose Change Type, then Date.
- Right-click the Attribute column and choose Remove.
- Right-click the Value column, choose Rename, and call it No. of Customers.
- Give the first column a suitable name, such as Length of Subscription.
- Rename the query to Budget.
- On the Home tab, click Close & Load.
The result is an unpivoted table that gives the right date for each subscription count:

Now change the date in C1 to 2020:

Refresh the query, and the dates in the unpivoted table follow:
