Forum Discussion

Tobias2019's avatar
Tobias2019
Regular Visitor
3 years ago
Solved

Datasets - Execute Queries with filtering on a string

Dear all,

 

how do I filter a DAX statement with Power BI REST API (Execute Queries), when the filter is a string value?

 

Something like this works

FILTER ('table', 'table'[column] = FIRSTNONBLANK('table'[column], 'table'[column]))

 

Something like this does not (and this is what I want to make work).

I guess, it is only about formating, since the " related to the filter value are understood as end of the JSON value from the PowerBI REST API

FILTER ('table', 'table'[columnArea] = "value")

 

Thanks for any support!

  • We had to use a delimator to escape the quotes. Ours is slightly different because we used to ExecuteQuery function in the request and did not have to use the single quotes for the table/columns, but for the = "value" portion ours looked something like:

    = \"value\"

2 Replies

  • We had to use a delimator to escape the quotes. Ours is slightly different because we used to ExecuteQuery function in the request and did not have to use the single quotes for the table/columns, but for the = "value" portion ours looked something like:

    = \"value\"