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
Hi everyone!
I'm using "get data"->"python script" , and connect to a API with some search parameters, Import data, and then some transformation in Power BI.
Now I want to include another search parameter in the script (model stays the same), but I cannot change that script. I only find the "Refresh" button that runs same script without the possibility of editing it.
How can I change the script without having to change all the model?
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
Please have a try.
Click Home>>Transform data>>Transform data.
Then Click Home>>Advanced Editor.
Then you can find the page now. Please have a try.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I have found a similar post, please refer to it to see if it helps you.
How to add parameters to Python script?
Reference Parameter from within Python Script
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
I think that is the solution, but I cannot understand how to get to this screen, can you give me a hint here?
thanks!
Hi @Anonymous ,
Please have a try.
Click Home>>Transform data>>Transform data.
Then Click Home>>Advanced Editor.
Then you can find the page now. Please have a try.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
yes, here is where you can edit the python query script and add a search parameter.
thanks!
@Anonymous , refer if this can help
https://datakuity.com/2021/01/05/power-bi-pass-parameter-value-to-python-script/
Thanks for the reference, but this is once you have loaded the data. I'm trying to change the script that gets the data originally from an API through a python script.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 66 | |
| 44 | |
| 40 | |
| 29 | |
| 19 |
| User | Count |
|---|---|
| 200 | |
| 126 | |
| 103 | |
| 70 | |
| 54 |