cancel
Showing results for 
Search instead for 
Did you mean: 
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
Moderator

@ThomasFoster,

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

Established Member
Status changed to: Delivered