Forum Discussion

radz's avatar
radz
Advocate I
10 years ago
Solved

Pass Parameters from a SP in SQL into parameters created in Power BI(which can accept values)

In short, "Pass parameters within a stored procedure(In SQL say) so that the parameter values can be called/used in parameters made in Power BI(query) ?"   For eg: I have a SP in SQL which has 2 pa...
  • ankitpatira's avatar
    10 years ago

    radz if i understood you correctly,

     

    you need to create a query first to sql server that executes a sp with hard coded value for parameter. then once data loaded in power bi right click that query and click create a function and craeate. Once function is created you need to right click -> Advanced Editor and replace code to parameterise hard coded values that will be supplied to sp parameter. hope that make sense.

  • radz's avatar
    radz
    10 years ago

    Hi @ankitpitara

    Yes it made sense and helped me. Thanks.

    But instead of creating a function, I directly replaced code in the Query created by going to Advanced Editor, to parameterize the hard coded values.

     

    This was done by adding Power Bi Parameters by concatenating them using &.

    Thanks for your help.