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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors