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.
Hi,
Is it possible to change dynamically legends in graphs as what is done with titles in this example?.
https://powerbiuniversity.com/informes-multilenguaje-formato-condicional-los-titulos/
What i need is to change legend names dinamically in the same way the title does. This is, when "es" is selected, Legend names turn into Spanish language.
And when "en" is selected the value shown was in English language.
Please help.
Thanks in advance and Regards.
Solved! Go to Solution.
Hi @DiegoCorriendo ,
We can create a calculated column in the fact table as below to get another language for label.
es = 'Table'[legend] &" es"
Then I enter a table like this.
Based on the table, to create another two calculated table.
en = FILTER(lan2,lan2[language] = "en")
esf = FILTER(lan2,lan2[language]="es")
To create realationship between tables like this.
After that, we can achieve our goal by a measure.
Measure = VAR a = MAX ( lan2[language] ) RETURN IF ( a = "en", CALCULATE ( SUM ( 'Table'[value] ), USERELATIONSHIP ( 'Table'[legend], en[lenegdlan] ) ), IF ( a = "es", CALCULATE ( SUM ( 'Table'[value] ), USERELATIONSHIP ( 'Table'[es], esf[lenegdlan] ) ) ) )
Hi @DiegoCorriendo ,
We can set conditional formatting of tile like this. Then we can change the tile name and legend as we excepted.
Hi and thanks for quick response.
I think maybe i don't have expressed correctly my problem.
What I need to translate are Legend values (Label, Label2 in graph) depending on value selected for the language.
That is, for "en" (English) value in the selection List it should be shown Label, Label2, but for "es" (Spanish) value or whatever, it should be shown it correspondant value in that language.
Title is already using conditional formatting as u point.
Thanks in advance.
Regards.
Hi @DiegoCorriendo ,
We can create a calculated column in the fact table as below to get another language for label.
es = 'Table'[legend] &" es"
Then I enter a table like this.
Based on the table, to create another two calculated table.
en = FILTER(lan2,lan2[language] = "en")
esf = FILTER(lan2,lan2[language]="es")
To create realationship between tables like this.
After that, we can achieve our goal by a measure.
Measure = VAR a = MAX ( lan2[language] ) RETURN IF ( a = "en", CALCULATE ( SUM ( 'Table'[value] ), USERELATIONSHIP ( 'Table'[legend], en[lenegdlan] ) ), IF ( a = "es", CALCULATE ( SUM ( 'Table'[value] ), USERELATIONSHIP ( 'Table'[es], esf[lenegdlan] ) ) ) )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |