cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MP_123 Member
Member

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

Accepted Solutions
Highlighted
Moderator Eric_Zhang
Moderator

Re: stored procedure with azure sql database

 


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.

2 REPLIES 2
Highlighted
Moderator Eric_Zhang
Moderator

Re: stored procedure with azure sql database

 


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.

skrishna Frequent Visitor
Frequent Visitor

Re: stored procedure with azure sql database

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

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 73 members 1,112 guests
Please welcome our newest community members: