Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

User Defined Parameters for BQ SQL

Hi,

 

I would like my users to define 2 key parameters and run Big Query SQL code, they need to supply a code and a start date. The SQL adds 30 days to the start date and uses the code the filter down the data.

 

So in effect the user would enter 2 reauired values in the report and the refresh the report. I think I can user Power Automate to refresh the report but how do I get these 2 paramters in to the query itself.

 

Creating a table of all codes is not possible, there are so many I dont even have a list of them.

Ideally it is just 2 text boxes the user completes and query can use these.

 

Thanks!

 

Tristan

2 REPLIES 2
Anonymous
Not applicable

Hi @amitchandak  - thanks for your reply and referring link.

 

While in the scenario above the dynamic range can be applied it seems to need a lookup table to be created in order for a user to refer to this. While creating a lookup table might be possible for dates it might be a little harder for the second part which is the code required. It had been my hope that a user could just input this and it be injected in to the query but I dont think this is possible. I will explore options around creating a lookup table in any case as it might be my only option. Thanks! Tristan

amitchandak
Super User
Super User

@Anonymous , check if Dynamic M parameter can help in this case

https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.