Forum Discussion
Internationalize Legends in graphs
- 7 years ago
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.
- v-frfei-msft7 years agoCommunity Support
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] ) ) ) )