2 Replies Latest reply: Mar 12, 2015 8:22 AM by Ruben Marin RSS

    QlikSense-Issue with LeftKeep ,Exists and Trim

      Hi,

      I have 2 qvds,Payment.qvd containing RebatePaymentPayeeId and Customer.qvd containing CustomerId.

      I loaded these two qvds into the application.

       

      Using Left Keep,I filtered the data.It is working fine and returning 28 records.

      When I tried using Exists function,data is not filtering and I am getting all the rows (15185).

      I assume that left keep and Exists work in the same way except for 1 reason that Left keep does data filtering after loading all the columns in the memory and Exists does data filtering while loading only and brings in only the filtered rows into memory.

      Then I used trim function for CustomerId and loaded qvds using Exists,now it is working fine and returning 28 rows only.

       

      So my questions are:

      1.When LeftKeep and Exists functionality is same, why is it returning different no. of rows?

      2.Trim only removes spaces, then why exists is working when used trim?

       

      I have attached 2 qvds and the application file in which I explained the 3 scenarios.

      Can anyone help me in this.

      Thanks in Advance

        • Re: QlikSense-Issue with LeftKeep ,Exists and Trim
          Michael Tarallo

          Hi Mansa - Thanks for your support - I am looking into this with our team.

           

          Regards,

           

          Mike

          • Re: QlikSense-Issue with LeftKeep ,Exists and Trim
            Ruben Marin

            Hi manasa,

             

            If I simple-quoted the field name in the exists() function it works, filtering 28 customers:

            Payment_Exists:

            LOAD

                  RebatePaymentPayeeId AS E_RebatePaymentPayeeId

            FROM [lib://Desktop/Payment.qvd]

            (qvd);

             

            Customer_Exists:

            NoConcatenate LOAD

                CustomerId as E_RebatePaymentPayeeId

               FROM [lib://Desktop/Customer.qvd]

            (qvd)

            where exists('E_RebatePaymentPayeeId',CustomerId)

            ;

             

             

            Also seems to work if I use Text() function:

            Payment_Exists:

            LOAD

                 Text(RebatePaymentPayeeId) AS E_RebatePaymentPayeeId

            FROM [lib://Desktop/Payment.qvd]

            (qvd);

             

            Customer_Exists:

            NoConcatenate LOAD

                CustomerId as E_RebatePaymentPayeeId

               FROM [lib://Desktop/Customer.qvd]

            (qvd)

            where exists(E_RebatePaymentPayeeId,Text(CustomerId))

            ;