Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi !
I have a language table
Now i will add language name to a filter When i click on enlish it should display one value when i click on French it should show another value.How can i do it
For exaple the code should be like this,this code is executed in power bi by taking a text and adding the measure value in it But not in qlick sense.can u plz help me
Measure 2 = IF(SELECTEDVALUE('LANGUAGE'[LANGUAGENAME])="ENGLISH","Number of hours of training followed",IF(SELECTEDVALUE('LANGUAGE'[LANGUAGENAME])="FRENCH","NNombre d'heures de formation suivies","Aantal trainingsuren gevolgd"))
The equivalent Qlik expression would be something like this:
=Pick( Min(LANGUAGEID) , 'Number of hours of training','Nombre d''heures de formation suivies','Aantal trainingsuren gevolgd')
I would actually rather extend the language table to also contain the strings and make the expression simpler and the translations much more maintainable by not including them in individual chart expressions....
Thank you But i want to use Language name in Filter not language Id
Then it is:
Pick( Match( MinString(LANGUAGENAME) , 'English' 'French','Dutch')
,'Number of hours of training'
,'Nombre d''heures de formation suivies'
,'Aantal trainingsuren gevolgd'
)
Notice that Minstring is used in case the user has selected none of the languages or more than one. Then it will always be able to make a translation as it will pick the first selected language.
Also be aware that you can use LANGUAGENAME as a filter and still use LANGUAGEID in your expression due to the associative data model in Qlik.
I am getting an error in Expression
Add an extra closing paranthesis after LANGUAGNAME)
Like this:
Pick( Match( MinString(LANGUAGENAME)) , 'English','French','Dutch' )
.....
.....
)
No When i added another paranthasis there it is showing another error as Match takes 2 parameters,then i removed Language name and added as
Pick( Match( MinString('English','French','Dutch')) , 'English','French','Dutch' )
.....
.....
)
Then error is minstring takes only one parameter
If you take my original Pick(Match( expression and add a comma in between the 'English' and 'French' it will be a valid expression... I missed out a comma ....