Forum Discussion
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:
- StartDate Type = DateTime
- EndDate Type = DateTime
- ClientName Type = Text
Displayed below are two of the parameters and their types,StartDate and ClientName
1 & 2 (parameter properties only shown for StartDate)
Client Name Parameter Properties:
This is the stored procedure that is executed within the PowerBI environment that pulls the data from SQL into PowerBI:
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:
The different data returned evidenced by the client’s name:
Any help or insight would be greatly appreciated. Thanks!
Aaron
3 Replies
- otraversCommunity 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.
- AnonymousNot applicable
It's using it. All the Parameters I Pass in SSMS return the data set I asked for.
- otraversCommunity Champion
Check the native query and query plan (copy your queries to a dataflow first if they're currently in a dataset).