Forum Discussion
Prompting and Passing Parameters in query
Hello all
I am trying to pass a parameter in the sql query, like in crystal reports. That way I can limit the amount of data that is being loaded in and I can create a report for different teams. All the data is the same, its just filtering it before loading for those team.
My parameter is named Team_Input.
I got this to work, but it pulls no data (no errors too)
""DOC"",""Team_Name""='Text.From(Team_Input)'
Hi rjs2
Please check this article: https://community.powerbi.com/t5/Desktop/Parameterized-SQL-Query-with-query-folding/td-p/171503
You need & to combine text with an M-command. So something along these lines:
""DOC"",""Team_Name""=' " & Text.From(Team_Input) & " '
5 Replies
- ImkeFCommunity Champion
Hi rjs2
Please check this article: https://community.powerbi.com/t5/Desktop/Parameterized-SQL-Query-with-query-folding/td-p/171503
You need & to combine text with an M-command. So something along these lines:
""DOC"",""Team_Name""=' " & Text.From(Team_Input) & " '