Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I am fairly new to Power BI and need help with the following scenario.
- I am using Python Script as the datasource.
- This python script calls REST APIs internally with tokenA as the API token and creates 4 dataframes such as ModelA, ModelB, ModelC and ModelD.
- These dataframes are then treated as models in Power BI and I create report/dashboard from the data.
- Now, I want to edit the API token used in the python script to tokenB and save it. On saving, the 4 models should be updated with the new data.
- To achieve this, I tried to find a way to edit the Pyhton script source but could not find anything. So, I had to edit the Source of ModelD and save it.
-----
- On doing this, the script returns 4 dataframes ModelA, ModelB, ModelC and ModelD again but now these dataframes gets assigned to ModelD. Instead, the output of dataframes should have mapped to the existing models which were created in the intial steps.
The update of API token is just one scenario, there might be cases where I need to add/remove dataframes returned from the script?
Is there a way to edit the original python script which affects all the models which were created from this script?
Let me know if you need additional data to answer my query.
Regards
You are running these four models four times each . It would be easier to run each model separately, and create only one dataframe which can map to exactly one query output.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 49 | |
| 40 | |
| 37 | |
| 14 | |
| 13 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 37 | |
| 28 | |
| 27 |