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.

Reply
onovoletto
Regular Visitor

REST API - ExecuteQueries Function

Hello guys,

 

I need to execute a query with function "ExecuteQueries" from PBI API, but i have to send my Query DAX with params and variables, that function support variables e definition like 

DEFINE VAR __DS0FilterTable = TREATAS({'Some value'}) ?
 
Because I receive a return like syntax error:
Query (1, 174) The following syntax error occurred during parsing: Invalid token.
 
Thank you.
2 REPLIES 2
GilbertQ
Super User
Super User

Hi @onovoletto 

 

What I would suggest doing is to first input your variables into a long piece of text so that you are not putting the variables at runtime.


Then in the next step pass this entire string text to the ExecuteQueries and see if that works?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Do you know how I pass the dynamic M query params with this request "ExecuteQueries"?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors