Updated on

Table.SingleRow is a Power Query M function that returns the single row in a one-row table. The function throws an exception if the table has more than one row.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365


Table.SingleRow( table as table ) as record


Table.SingleRow returns the single row in the table. This function is used for one row table and throws an exception if more than one row exists.


Return the single row in the table.

// Output: [CustomerID = 1, Name = "Bob", Phone = "123-4567"]
Table.SingleRow( Table.FromRecords( {[CustomerID = 1, Name = "Bob", Phone = "123-4567"]} ) )

Other functions related to Table.SingleRow are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: