Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

0

ROW() marks variables as errors despite being valid

If you use ROW to create a table and you use a variable for the column name segment Power BI will mark the variable as invalid with the red line. If you run the table it will still work.

 

However if you try to use a function to create the column name it will fail, e.g. if you use "Column" & "Name" instead of "ColumnName"

 

For example 

 

Table =
VAR _ColumnName = "ColumnName"
RETURN
    UNION (
        ROW ( _ColumnName, "A" ),
        ROW ( _ColumnName, "B" )
    )

I am not sure if the behaviour about it failing when functions are used to define the column name is a bug but the error it creates when using variables for column names does look like one.

Status: Delivered
Comments
v-yuezhe-msft
Employee

@Anonymous,

Please check this official article, for <name>part, ROW() function expects a column name which is enclosed in double quotes.

ROW(<name>, <expression>[[,<name>, <expression>]…])

Regards,
Lydia

Vicky_Song
Impactful Individual
Status changed to: Delivered