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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Python script activated on Button

Dear All,

I have the following case:

 

I have a report that should display data based on user language. I planned to create a Python script that renames the labels.

I would like to have a button saying for example Spanish, and when the user clicks on this button, he activates Python script that translates the report into Spanish. 

 

Is such an option possible? Can I assign Python script to button?

 

Thanks,

Olga

4 REPLIES 4
dm-p
Super User
Super User

Hi @Anonymous,

This would not be possible currently. The container for custom/R/Python visuals is sandboxed from the main DOM and can only receive data from the this outer DOM for processing inside its own container. These visuals aren't able to directly communicate back out with the main Power BI window, except for specific APIs such as slicer functionality (which I believe is only accessible via the TypeScript SDK). You could not for example, send localisation strings or a locale code back from this container to other visuals in your report for them to act upon.

The state of multi-lingual support in Power BI hasn't really improved. The following two videos are still the most flexible you can get at this time (although you have since been able to manage visual titles with DAX/conditional formatting):

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Hi,

I have understood that multi language is not supported yet. 

 

But how about starting any other python script with a button in Power BI?

Does anyone know?

 

BR Thomas

Anonymous
Not applicable

Hi,

 

I have to implemement this too.

I have been looking this up the last days/weeks and can't find anything.

Did you figure it out yet?

 

Best regards,

Victor

Anonymous
Not applicable

Hi, 

 

Did you figure it out? I need to implement something similar

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors