In this blog you will understand working of “ROW DAX function”. Its comes under Table manipulation function category.
Row DAX function returns a table with a single row containing values that result from the expressions given to each column.
ROW(<name>, <expression>, <name>, <expression>.....)
name- The name given to the column, enclosed in double quotes.
expression- Any DAX expression that returns a single scalar value to populate. name.
- Arguments must always come in pairs of name and expression.
- This function is not supported for use in Direct Query mode when used in calculated columns or row-level security (RLS) rules.
The ROW function returns a single row table.
Let’s get started-
Download the sample Dataset from below link-
Now add new table using Dax expression – Go to Modeling Tab > Select “Write a DAX expression to create a new table”.
After that write below DAX code-
Table = ROW("Total Sales", SUM(Orders[Sales]), "Total Profit", SUM(Orders[Profit]), "Total Discount", SUM(Orders[Discount]))
This function will return single row table with Total sale, profit & discount. See the result as given below screenshot.
Refer DAX post:- DAX Tutorials