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
aishs_15
Frequent Visitor

Text input to Python visual

Hi ,

 

Can we have a text box (for user input) or selector dropdown (where some values or single value from a list can be chosen by the user) whose values can be passed in the Python code of the Python visual in PowerBI. i.e. these inputs should be accessible in the Python code.

I don't want to use a parameter since that is increasing the record count of the default pandas dataframe getting created in the Python visual.

 

Thanks in advance!

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. I don't think you can with two different visualizations. The interactions between visuals are applied by real data in the data model. So even if you write something in one visual you can't capture that in another. The input and what ever you want to build might have to be the same python visual script. Just for the heads up, I don't think you can any way make input data at power bi that works properly.

PowerBi reads data. So the fake way to do it is loading a lot of data and filtering with text filters. 

If you want to input something that will change the query to the data, the only way is with parameters.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

2 REPLIES 2
v-yadongf-msft
Community Support
Community Support

Hi @aishs_15 ,

 

Has your problem been solved? If solved, please consider Accept it as the solution to help the other members find it more quickly.

ibarrau
Super User
Super User

Hi. I don't think you can with two different visualizations. The interactions between visuals are applied by real data in the data model. So even if you write something in one visual you can't capture that in another. The input and what ever you want to build might have to be the same python visual script. Just for the heads up, I don't think you can any way make input data at power bi that works properly.

PowerBi reads data. So the fake way to do it is loading a lot of data and filtering with text filters. 

If you want to input something that will change the query to the data, the only way is with parameters.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

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.