5 Replies Latest reply: Jun 21, 2017 12:41 PM by Kathrin Hilse RSS

    Adress field with variable

    Kathrin Hilse

      Hey everyone!

       

      I have a question regarding a variable in a set expression.

       

      My data structure is as follows: I have one table with KPIs per year per unit.

      I have another table for the localisation of the app: It consists of one Expression_Id and a column for each language, f.e.

       

      Expression_ID         de-de                              en-us

      Equity ratio               Eigenkapitalquote          Equity Ratio,

       

      where the Expression_Id equals the English version of the KPI name for the code to be understood much more easily.

       

      Depending on a selection on language, I want QlikSense to show the name of the KPI from the column containing the name in the selected language. F.e. if the selected Language is de-de, QlikSense should show the German name of the KPI identified by the expression_ID from the column de-de.

       

      I have one variable, vLanguage (=Getfieldselections(Language).

       

      To get the KPI name in the desired language, I use the following expression:

      Only({$<Expression_ID={Equity ratio}>}$(vLanguage)),

       

      which return only the name of the selected language, but does not address the column in the language table whose name equals the selected language.

       

      Can somebody please advise how to address columns/fields based on variables?

       

      Thanks in advance!

       

      Kathy