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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
saivina2920
Post Prodigy
Post Prodigy

How to call stored procedure along with parameter in M Code

I am struggling to call stored procedure along with parameter in M Code .

below is my table :

StudentIDStudentNameMarksDOJ
1Jame's10012/28/2023 10:02
2Steave Smith20012/28/2023 11:32
3Waugh30012/28/2023 9:02
4Waugh40012/28/2023 13:32
5Smith60012/28/2023 14:02

 

My stored procedure like below.

 

EXEC MyStoredProc "TimeParam"1 

 

Example, "TimeParam1" ==> values like (06:00 AM,07:00 AM,....12:00PM) slicer fliter

 

When i pass the value like "10:00 AM" (TimeParam1), it should return all below 10:00 AM records on the condition with "DOJ" column

 

how to do this using stored procedure along with parameter in M Code.

 

I want this solution in stored procedure only.

 

pls. help.

 

i want to pass time as parameter from DOJ column through stored procedure. 

 

For example,

if i pass time "10:00" it should show till 10:00 AM records

if i pass time "11:00" it should show till 11:00 AM records

How to do this..

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@saivina2920 , Please refer this for SQL server SP

 

https://www.c-sharpcorner.com/article/execute-sql-server-stored-procedure-with-user-parameter-in-pow...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@saivina2920 , Please refer this for SQL server SP

 

https://www.c-sharpcorner.com/article/execute-sql-server-stored-procedure-with-user-parameter-in-pow...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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 MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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