Trace a result row back to its source rows
A query's result says North had 262.24 in revenue. Which orders make up that number? In Dotty you can ask the row itself.
This page uses the dataflow from Step through a SQL query: customers and orders joined, completed orders only, grouped by region and sorted by revenue. Load that script and choose Run.
1. Open the result
Click the dot on the right edge of the sort, Sort_1. Its records are the query's result: North, South and East.
Each row has a small button at its start. Choose it on the North row.
2. Read the trail
The Provenance panel draws the part of the dataflow that the row came through. The number on each box is how many of its records went into the North row: 3 orders and 2 customers, 3 joined records, 1 group and 1 sorted row.
Below it, each step says what it did for this row. The join matched on customer_id and status, the aggregate counted 3 orders and summed 262.24, and the sort put it first.
3. Open a source
Click the orders box in the panel. It lists the 3 of the 10 orders that went into the North row: 120.00, 42.25 and 99.99, which add up to 262.24.
With Used columns only ticked, the table shows only the columns the query used. Untick it to see every column, and choose Download CSV to keep the rows. Click customers or Join_1 to see their part the same way.
Try it
The Revenue by Region example is the same kind of query, with the filter as its own step. Run it and trace a row the same way.
Open the Revenue by Region exampleNext: Why did my JOIN multiply the rows?, to use a trace to find a duplicate key.