Search code examples
powerbipowerbi-custom-visuals

Add custom javascript snippet/file to handle dynamic translations - load in Power BI Service


I've read multiple sources about including javascript in Power BI and how this is done. What I've found so far is, that this can be achieved through the Power BI Javascript API or through a Custom Visual (I'm rather new to Power BI so please correct me if I'm wrong).

However, I haven't found any source stating whether it's possible to alter other visuals using javascript implemented this way?

The goal is being able to dynamically translating headers of tables (no native way in Power BI of doing that yet except of duplicating data as far as I know; which we'd rather avoid).

So in short the questions is:
Is it possible to have any javascript implemented through either a Custom Visual or the Javascript API that can alter and translate the headers of a table on a given page in the report?


Solution

  • Your custom visual would not be able to affect other visuals in the way you're hoping for.

    While it's not dynamic, you can always alias any fields or measures added to a PBI visual by double clicking the item in the field well and typing over the default name.