Forum Discussion
dobregon
Impactful Individual
5 years agoFilter SQL query using parameters
Hi guys, I want to take values from a table in my SQL server but i want to filter the query acording a parameter. Imagine that i have a million of rows about daily values of customers and i w...
- 5 years ago
Thanks edhans
In reality, that i didnt understand is what simply was to put the same name than the parameter in the powerquery and this will filter the query...
i just find the new video from Patrick that it is very visual to see what i'm looking for and for future visitors to this topic.
Thanks edhans and CNENFRNL for your support!
dobregon
Impactful Individual
5 years agoI have opened again if someone can help me on this. The other solution is valid to simple queries, but now i have a query to an SP in SQL
DECLARE @dateFrom VARCHAR(10) = DATEADD(DAY,1,EOMONTH(GETDATE(),-2))
DECLARE @dateTo VARCHAR(10) = NULL
EXEC [bi].[SP_Values]
@dateFrom_input = @dateFrom
,@dateTo_input = @dateTo
As you can see i need to send values to the parameters in the SP. That i want is to create parameters in the PowerBI and call them like
DECLARE @dateFrom VARCHAR(10) = ParameterStartDate
DECLARE @dateTo VARCHAR(10) = ParameterEndDate
EXEC [bi].[SP_Values]
@dateFrom_input = @dateFrom
,@dateTo_input = @dateTo
is this possible?