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
rohitpaliwal
New Member

How to call a stored procedure from PowerBi report

Frnds,

 

I've got four drop downs in my report

 

1. Country

2. State

3. City

4 Store

 

the navigation is working fine, but I've a requirement to take this to next level i.e. in each drop down I've option to select either one or all, now once the selection is made, I want to use this as a input parameter for a stored procedure which resides in my sql server database.

 

Is this possible

If yes then how

7 REPLIES 7
v-shex-msft
Community Support
Community Support

HI @rohitpaliwal,

 

Current you can only invoke SP at import mode, live mode(direct query, live connection) not support.

 

Reference:

Call an SP

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I understand that in the new query editor I can use the stored procedure but how do I populate the parameter from the drop down visualization i.e. slicer in my case, first will list country, second will have states, third will have city and fourth will have storeIDs, now I can either have all selected or any indivudial values and on the basisi of this select tion, my procedure should execute like below

 

exec dbo.myproc countryid = @countryvar,  stateid = @statevar, cityID = @cityID, storeDi = @storeID

Hi @rohitpaliwal,

 

Nope, it is impossible to post visual value as parameter to power query, you need to use query parameters to instead.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Is it possible to capture the selection in Page1 (using any method) and once user has selected the options then on the basis of the selection on page1, I can redirect it to next page where I'll get data on the basis of selection on page 1?

Hi @rohitpaliwal,

 

>>Is it possible to capture the selection in Page1 (using any method) and once user has selected the options then on the basis of the selection on page1, I can redirect it to next page where I'll get data on the basis of selection on page 1?

Maybe you can try to use the drill throught filter feature.

Use drillthrough in Power BI Desktop

 

Regards,

XIaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

Are you importing the data from SQL or connected live?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Currently I'm importing data, and all related tables for these drop down are present into my power Bi desktop, alternative,y can I rewrite the stored procedure login into power bi? i.e. all the data manuplation etc.

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.