1 Reply Latest reply: Apr 10, 2013 4:20 AM by Jerry Svensson RSS

    Dynamically changing "Caption" (TEXT Object) based on Selection

             Hello Every one,

       

      I am newbee and learning my way arounds qlikview.

       

      I am trying to change "Caption" in Text object dynamically based upon Selection from List Box.

       

      e.g. I have table that contains 3 Country

      1. Japan

      2. Germany

      3. USA

       

      I used IF Condition, and default value will always be "USA" but if User select "Japan", Caption turns into "Japan"

       

      its easy to change caption Dynamically when User Select only One Country.


      =if(GetPossibleCount(Country) = 1 ,if(GetFieldSelections(Country)='USA','USA' , if(GetFieldSelections(Country)='JAPAN','JAPAN' ,

      if(GetFieldSelections(Country)='GERMANY','GERMANY'  ))),'USA')

            

      I don't know how to proceed further if User Select Multiple Countries. I have different rules when its multiple country.

       

      Default Caption- (No Selection) - USA

      Default Caption- (Single Selection  USA) - USA

      Default Caption- (Single Selection  Japan) - Japan

      Default Caption- (Single Selection  Germany) - Germany

      (resolved)


      Default Caption- (Multiple Selection  USA  & Japan),  USA

      Default Caption- (Multiple Selection  USA  & Germany),  USA

      Default Caption- (Multiple Selection  Germany & Japan),  Japan

      Default Caption- (Multiple Selection  Germany & Japan & USA),  Germany

       

      Kindly advice how to resolve above red lines in expression.