Forum Discussion
aroyappan
9 years agoFrequent Visitor
How to pass values to variables declared in Power BI SQL Statement
I'm connecting to SQL server using direct query connectivity mode and diretly entering the query into SQL statement input field as shown below: Here is the SQL statement: DECLARE @Te...
v-sihou-msft
9 years agoMicrosoft Employee
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
Regards,