user3799279
user3799279

Reputation: 153

Power BI Advanced Editor how to get Text of SelectedRow?

I'm new to Power BI, have been testing trying to fetch data from an API and have done so with a little success. One of the calls I've been playing around with will take a begin and end date as well as a comma separated list of ids in the body of the call and will return information about each id. I'm struggling with the comma separated list a little. I have a query that creates the comma separated list, it ends up being a 1 record table with this comma separated value. I am using Text.Combine to concatenate the body parameters, but when I try to concatenate the comma separated values I get the message "Expression.Error: We cannot convert a value of type Table to type Text." I have a variable, #"Filtered Rows", set to Table.SelectRows(#"Extracted Values", each ([Index] = 1)) and am trying to concatenate this in Text.Combine. Ok, it's a table and it can't be concatenated to a string. How do I get the value of the selected row as text so that it may be concatenated?

Upvotes: 0

Views: 223

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40204

The Text.Combine function expects a list as its first argument.

Fortunately, specifying TableName[RowName] gives a list so that you can write the following:

Text.Combine(#"Filtered Rows"[ColumnYouWantToCombine], ",")

Upvotes: 1

Related Questions