2 Replies Latest reply: Dec 5, 2016 12:52 PM by Sunny Talwar RSS

    set analysis + GetFieldSelections + Fieldvalue

    alexandre BRANCHE

      Hello,

       

      I have a syntax error and I can't get rid of it. Or maybe I want something impossible for qlik sense 3.1... (Desktop for the moment but enterprise in near future).

       

      I'm building an international app for our plants and I need to translate a lot, even dimensions in loading phase, in order to let super users build there own analysis in addition to standard ones. To maintain app in smarter way I should create one only main app but adapt a parameter to load plant's specific data with daughter published apps.

       

      At the end of loading script I use "Rename Fields using TransMap" so any dimensions are modified in relation to Plant's language setting and mapping table.

       

      I also store my dimension's translation in a table to re-use it later in app.

       

      In a graph sheet I want to show a double axis analysis based on the first 2 selections in a listbox filter. I managed to do it... but!

      When I create axis value expression, I use translated dimension name. When loading new data for a new plant in new languages, Qlik sense magically auto translate dimensions except one in text expression. So I tried to translate manually this expression but I didn't succeeded.

       

      Here it is, formula used to recover average of values for second choice in filter aiming "FRCriteria_label" dimension thus named after  translation in french (not accurate translation, but I'm just in r&d phase by now) :

       

          avg ({$ < FRCriteria_label=  {  '$(=trim(SubField ( GetFieldSelections (''['&Fieldvalue('TransTable',

                  FieldIndex('DIMENSIONLABEL','Criteria_label' ))&']'',',',2) ,',',2) ) )'    }        >   } $(v_Formula)  )

       

      Previously I used successfully:

      avg ({$ < FRCriteria_label=  { '$(=(trim(SubField(GetFieldSelections([FRCriteria_label],',',2),',',2))))'    }   >  } $(v_Formula) )

       

      In Title zone I get the correct result for '['&Fieldvalue('TRADCHAMPS',FieldIndex('CHAMPS','Criteria_label' ))&']'

      [FRCriteria_label]

      But i know it's a string result.

       

      How can I use it to dynamically adapt non auto translated string expression in my script?

       

      Thanks for any help !

       

      Alexandre