cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
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
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 253 members 2,020 guests
Please welcome our newest community members: