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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.