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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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