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
Syntax
Table.SingleRow( table as table ) as record
Description
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.
Examples
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"]} ) )
Related functions
Other functions related to Table.SingleRow are:
- Table.AggregateTableColumn
- Table.First
- Table.FirstN
- Table.FirstValue
- Table.Last
- Table.LastN
- Table.Max
- Table.MaxN
- Table.Min
- Table.MinN
2023-2026 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy