Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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)'
Solved! Go to Solution.
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) & " '
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
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) & " '
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
How do you get it to ask for the parameter during a refresh? or prompt the user to enter a new parameter?
Hi @rjs2
I'm not aware of any such feature.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
ok.... I will search more. If not, this at least makes it easy for me to change and build reports for multiple teams.
Thank you!!! That worked!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 6 | |
| 5 | |
| 4 | |
| 3 |