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 there,
I was trying to see if we could run a Python script in PowerBI using a PowerBI variable as part of the script.
For instance, the script would be:
print({Sum of Sales Variable})
The end goal is to have a Predictive model written in Python that runs within PowerBI based on input parameters from the dashboard. That way the business user would just have to select an input value, click "refresh" and the model would re-run using that input value. Then the visualizations would get updated on their own.
Any advice on how to do that?
Thanks!
@Anonymous ,
You may just try Create Power BI visuals using Python.
Thanks, @v-chuncz-msft .
I have tried it and was able to use the parameter there, but I want to use the PowerBI visualizations.
Can you re-integrate data frames from the Python viz as PBI data table? Or is there a way to integrate the parameter into the Python script when loading data tables?
Thanks!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 27 |
| User | Count |
|---|---|
| 133 | |
| 104 | |
| 61 | |
| 59 | |
| 55 |