12 Replies Latest reply: Oct 9, 2013 7:07 PM by Car Bal RSS

    How to use IN operator in Qlikview

      hi,

       

      actually i had a table in which i got various order values but i want to display only those orders which are 24,26, & 27.

      In Sql we can use IN operator for that.

      Please help me here how to use it.

       

      Thanks

        • Re: How to use IN operator in Qlikview
          Rajni Batra

          =if(match(Order,24,25,26),Order or any other value)

          • Re: How to use IN operator in Qlikview

            This depends on where you want to include the in values.  If it is just in a text object or display object then using:

             

            =if(Match(Order,24,26,27),Order)

             

            But if you want to create an expression and only want the values of those 3 orders used in that expression then you would use set analysis in the expression like this:

             

            sum({<Order={'24','26','27'}>}(TotalSales))

             

            Hope this helps!

            • Re: How to use IN operator in Qlikview
              Gabriel Oluwaseye

              Hi,

               

              QlikView has a function called EXISTS. May be worth trying it.

               

              EXISTS( field [ , expr ] )

               

              Determines whether a specific field value exists in a specified field

              of the data loaded so far. Field is a name or a string expression evaluating

              to a field name. The field must exist in the data loaded so far

              by the script. Expr is an expression evaluating to the field value to

              look for in the specified field. If omitted, the current record’s value

              in the specified field will be assumed.

               

              Examples:

              EXISTS( Month, 'Jan' )

              returns -1 (true) if the field value Jan can be found in the

              current contents of the field Month.

               

              Regards

              • Re: How to use IN operator in Qlikview
                Deepak Shrivastava

                You need to specify.. where you want to use the values.. as expression or dimension. lo_arron has already answered it. If you could clarify it. we can try and get back to you soon.  OR you can share the application and requirement, we will surely try helping you.