Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Passing values to variables declared in Power BI SQL Statement

How  do we pass values to variables declared in Power BI SQL Statement? I am using a direct query.   Is there a workaround for this? 
  • v-xuding-msft's avatar
    7 years ago

    Hi Anonymous ,

    Try not to use variable in your SQL statement. It will not prompt out any window for input value for variables. In this scenario, you can use Query Parameter in the generated Power Query ( just go to "Advanced Editor" in Query Editor).

    For more details, see: Deep Dive into Query Parameters and Power BI Templates

     

    Best Regards,

    Xue Ding

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.