Table.First
This function retrieves the initial row from the table. If the table is empty, the function returns an optional default value, which is specified by the user.
This function retrieves the initial row from the table. If the table is empty, the function returns an optional default value, which is specified by the user.
Retrieve the initial row from the table by utilizing the Power Query M function MTable.First. If the table is empty, the function will return [a = 0, b = 0].
Example 1:
Input:
Find the first row of the table using Power Query MTable.First with the dataset containing three records: [CustomerID = 1, Name = "Bob", Phone = "123-4567"], [CustomerID = 2, Name = "Jim", Phone = "987-6543"], and [CustomerID = 3, Name = "Paul", Phone = "543-7890"].
Output:
The first row retrieved from the table will be [CustomerID = 1, Name = "Bob", Phone = "123-4567"].
Example 2:
Input:
Utilize Power Query MTable.First function to extract the initial row of the table, and if the table is empty, return [a = 0, b = 0].
Output:
If the table is empty, the output will be [a = 0, b = 0].