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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Custom input and output in PowerBI using python script

Hi everyone,

 

I am new to PowerBI and I have used dashboard tools such as Plotly-Dash previously.

I want to execute a simple task in PowerBI with the help of Python Script.

 

For example: I want to show what will be the square of selected number in PowerBI (for now assume the range is 0-20). So if user selects 2, the answer should be shown is 4. If user selects 11 then the answer should be 121. For the squaring, I am using Python script in the background (must be used).

How can I get this to work in PowerBI?

 

I know how to run Python script in PowerBI. I also know how to pass custom parameters. I am not sure how to connect parameters and visuals to generate the output.

 

Thank you in advance!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

3 REPLIES 3
Anonymous
Not applicable

Hi @lbendlin, thank you for your reply. It is working and gives me what I want. 

Is it possibel to use PowerBI graphs (instead of python graphs) for this? If I have multiple graphs, do I have to run same (graph) script for multiple time?

Not sure what you are asking for. Do you no longer want to use Python?

lbendlin
Super User
Super User

see attached

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.