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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

SQL STORE PROCEDURE - URGENT

Hi,

 

Can any one help to understand how to utilize store procedure in Power Bi, instead of pulling the tables separately and writing the formulas. In store procedure everything is well organized but the only thing is if we want to execute then start date, end date, store id this parameter should be passed but if we do so then only that specific date, store is i am getting in power bi.

 

But i need for every store, all dates. kindly suggest if there is any easy way to achieve this. Let me know if need to attach the sql query, will do so

3 REPLIES 3
Anonymous
Not applicable

Hi Jen,

 

thank you for the response, but is there a way that instead of creating parameters and passing the value, can we have the slicer selection and based on that the data will adjust accordingly because we should have one slicer for date, store and so on and accordingly only the data should show up

You can do this by using dynamic M parameters.  This is a really good page that explains the process in detail.

https://blog.crossjoin.co.uk/2022/02/20/tsql-table-valued-functions-and-dynamic-m-parameters-in-powe... 

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

jennratten
Super User
Super User

Hello - it sounds like you need to invoke stored SQL procedures for lists/multiple items.  These pages provide a very good overview of how to accomplish the task with examples and pictures.

 

https://databear.com/sql-stored-procedures-in-power-bi/ 

https://hatfullofdata.blog/power-query-function-to-execute-a-procedure/ 

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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