1 Reply Latest reply: Jun 11, 2012 6:19 AM by Stefan Wühl RSS

    Replacement of switch statement in Qlikview

      Hi All,


      Can anybody tell me if we have any function which does a job what 'switch' statement does in C. I have multiple conditions and I don't want to use if statement as it processes whole statement by processing if then else if then else ......


      All my conditions are unique and independent of each other and I have different execution statments under each conditional statement. I want to use cases for the same.


      Please let me know if my doubt needs more clarification to be understood.




        • Replacement of switch statement in Qlikview
          Stefan Wühl

          There are actually switch / case / default control statements for use in the QV script.


          I assume you want to use something similar in the frontend?


          I haven't fully understood what you mean with all conditions are unique and independent, could you maybe post a C style sample of what you want to achieve?


          You could look into pick() function (and maybe combine with a match() to a pick(match(...), ...,...) ).