Forum Discussion
Dynamic Power BI reports using Parameters
Hi,
I need help using 2 parameters with Stored Procedure in Power BI
I watched this Video -https://www.youtube.com/watch?v=iiNDq2VrZPY which helps starts with parameters however i managed to set one parameter working fine but struggling with 2nd parameter.
below code is working as expected
"EXEC SP_BACK 'IB6701',"& Date]
i am tring as below for 2nd Parameter which is not working.
"EXEC SP_BACK_DATED_VALUATION "&PlanNo,& Date]
Thanks in Advance.
Narayan
Hi mnarayan ,
In your second expression, you used a comma directly in the middle of the parameters, which is not allowed.
Please try the following code. Note that the numeric parameter needs to be converted to text using the Text.From function.
[Query="EXEC GetProductDesc_withparameters2 " & Parameter1 & "," & Parameter2]Or
[Query="EXEC GetProductDesc_withparameters2 " & Text.From(Parameter1) & "," & Parameter2]If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- v-kkf-msftCommunity Support
Hi mnarayan ,
In your second expression, you used a comma directly in the middle of the parameters, which is not allowed.
Please try the following code. Note that the numeric parameter needs to be converted to text using the Text.From function.
[Query="EXEC GetProductDesc_withparameters2 " & Parameter1 & "," & Parameter2]Or
[Query="EXEC GetProductDesc_withparameters2 " & Text.From(Parameter1) & "," & Parameter2]If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - mnarayanFrequent Visitor
Worked as champ.. thank you very much.