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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.