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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Passing parameters from SQL Stored Procedure through a PowerBI Template

Hi,

@otravers
@amitchandak
@v-yuta-msft
@v-yulgu-msft
@V-lianl-msft
@Anonymous,

why are my parameters not passing through the template to invoke a function that returns the data I asked for?

 

I am trying to pass three parameters:

  1. StartDate  Type = DateTime
  2. EndDate   Type = DateTime
  3. ClientName Type = Text

Displayed below are two of the parameters and their types,StartDate and ClientName

 

1 & 2 (parameter properties only shown for StartDate)

aaronrogers_2-1657574245497.png

 

Client Name Parameter Properties:

 

aaronrogers_3-1657574345466.png

 

This is the stored procedure that is executed within the PowerBI environment that pulls the data from SQL into PowerBI:

aaronrogers_5-1657574574262.png

Currently the data that is returned is not what I askded for in the parameters even after I apply changes and refresh the entire page, Example:

 

What I asked for in the parameter: 

aaronrogers_6-1657574629919.png

 

 

The different data returned evidenced by the client’s name:

 

aaronrogers_7-1657574790016.png

Any help or insight would be greatly appreciated. Thanks!

 

Aaron

 

3 REPLIES 3
otravers
Community Champion
Community Champion

I'd start by doublechecking that the query in the stored procedure is actually using the ClientName parameter by running sp_helptext (nameofyourSP) in the source SQL server.

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
BI Blog: Datamarts | RLS/OLS | Dev Tools | Languages | Aggregations | XMLA/APIs | Field Parameters | Custom Visuals
Anonymous
Not applicable

It's using it. All the Parameters I Pass in SSMS return the data set I asked for.

 

Check the native query and query plan (copy your queries to a dataflow first if they're currently in a dataset).

https://docs.microsoft.com/en-us/power-query/query-pla

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
BI Blog: Datamarts | RLS/OLS | Dev Tools | Languages | Aggregations | XMLA/APIs | Field Parameters | Custom Visuals

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors