ROW
Returns a table with exactly one row, made of the named values.
ROW(<name>, <expression> [, <name>, <expression>] ...)Returns: A one-row table.
What it does
ROW builds a table with one row. Each named value becomes a column. The usual use is a check: put several measures in one row, run it with EVALUATE, and compare the figures with the ledger or another report. ROW returns a table, not a single value, so it cannot be the result of a measure that must show one number. Use a measure name on its own for that.
Syntax and arguments
- name: the column name, in quotes.
- expression: the value for that column, usually a measure or an aggregation.
- Repeat the name and expression pairs for each value.
Example
A tie-out query for the month-end pack, with three totals on one line.
EVALUATE
ROW (
"Total Sales", [Total Sales],
"Total Cost", [Total Cost],
"Gross Margin", [Gross Margin]
)
The output is one row with three columns. Compare the sales and cost figures with the revenue and cost-of-sales balances from the general ledger for the same period.
Example: a second use
A one-row check table in the model, which refreshes with the data.
Model Check =
ROW (
"Sales Lines", COUNTROWS ( Sales ),
"Stores", COUNTROWS ( Stores )
)
The table shows the number of sales lines and stores after each refresh. A sudden drop in either count is a sign that a load failed.
Things to watch
- ROW returns a table. Put it in a query or a calculated table, not in a measure that must return one value.
- A calculated table computes its values at refresh, with no report slicers. Use an
EVALUATEquery for live numbers. - Column names must be unique.
- For many rows, use
ADDCOLUMNSorSUMMARIZECOLUMNSinstead.
In business terms
Tie-outs: comparing report totals with the general ledger, sanity checks on row counts after a load, and summary lines for a memo that must match the model. It keeps each check in one place where anyone can run it.