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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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!


My course: Introduction to Developing Power BI Visuals


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

Hi, 

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors