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
MP_123
Employee
Employee

stored procedure with azure sql database

hi,

can i use stored procedure in DirectQuery mode? that gets pararmetets from my slicers, and show data according to?

 

thanks!

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee

 


can i use stored procedure in DirectQuery mode? that gets pararmetets from my slicers, and show data according to?

 


@MP_123

Based on my test, so far it is not support to use stored procedure in DirectQuery mode. When trying to set up to use a stored procedure, usually an error occurs as below.

Capture.PNG

 

The error cause is because in DirectQuery, it actually sends a SQL as below to database, which has syntax error.

Capture.PNG

 

Regarding parameter and filter, in DirectQuery mode, the selecting action in a Slicer actually fetches data with the selections as filter in SQL end. You don't have to use a stored procedure to apply parameters to filter data.

View solution in original post

2 REPLIES 2
skrishna
Regular Visitor

Any one has the solution for the same?

 

We created stored procedures in Azure SQL Database and trying to use them power BI report with Direct Query mode. But getting the error like "Microsoft SQL: Incorrect syntax near the keyword 'EXEC'. Incorrect syntax near ')'.

 

Another question is how to set the connection string as global so that I can use the same connection string in every report?

 

Please help me with the solution

Eric_Zhang
Employee
Employee

 


can i use stored procedure in DirectQuery mode? that gets pararmetets from my slicers, and show data according to?

 


@MP_123

Based on my test, so far it is not support to use stored procedure in DirectQuery mode. When trying to set up to use a stored procedure, usually an error occurs as below.

Capture.PNG

 

The error cause is because in DirectQuery, it actually sends a SQL as below to database, which has syntax error.

Capture.PNG

 

Regarding parameter and filter, in DirectQuery mode, the selecting action in a Slicer actually fetches data with the selections as filter in SQL end. You don't have to use a stored procedure to apply parameters to filter data.

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.