Sub topic 8
Rows, Columns, and Pivoting Your Data
This chapter assumes that you can open a GA4 property, understand basic events, and read a spreadsheet-style pivot table. It also assumes that you have created a Free-form exploration and imported the dimensions and metrics you need into the Variables panel.
How rows and columns shape the table
In the Free-form technique, the Tab Settings panel assembles your table. A dimension placed in Rows creates the labels down the left side. A dimension placed in Columns creates labels across the top. Metrics placed in Values fill the cells where those dimensions intersect.
For example, use these settings to compare sessions by channel and device:
| Tab setting | Field | Result |
|---|---|---|
| Rows | Session default channel group | One row for each channel |
| Columns | Device category | One column for desktop, mobile, and tablet |
| Values | Sessions | A session count for each intersection |
GA4 calculates each cell for one combination of dimensions. The mobile cell for Organic Search contains sessions that belong to both Organic Search and mobile. The row total contains all devices for that channel, while the column total contains all channels for that device.
Build a pivoted table
- Open the exploration tab and select the table visualization.
- In Tab Settings, drag Session default channel group into Rows.
- Drag Device category into Columns.
- Drag Sessions, Engaged sessions, or Total users into Values.
- Review the table and adjust the number of visible rows or columns if the result is too wide.
- Sort the rows by a useful metric, such as Sessions or Engaged sessions.
A table with only rows answers a question such as, “Which channels brought the most sessions?” Adding columns changes the question to, “How did each channel perform for each device category?”
The order of dimensions matters. If you put Device category in Rows and Session default channel group in Columns, you see the same combinations in a different reading order. This is a pivot: you rotate the arrangement without changing the underlying events.
Choose dimensions that answer one question
Use rows for the main comparison and columns for a short secondary breakdown. A few device categories work well as columns. A long list of landing pages usually works better as rows, because many columns make the table difficult to scan.
When you add more than one dimension to Rows, GA4 creates nested row groupings. For example, Channel followed by Landing page groups landing pages under each channel. This can reveal detail, but it can also hide the overall pattern. Start with one row and one column dimension, then add detail only when it helps explain an unusual result.
Use the same date range and metrics while changing the pivot direction. This makes it easier to tell whether a difference comes from the data or only from the table layout.
Exercise
You need to compare engaged sessions for Organic Search, Paid Search, and Direct across mobile and desktop. Which fields belong in Rows, Columns, and Values?
Show answer
Put Session default channel group in Rows, Device category in Columns, and Engaged sessions in Values.