4 Replies Latest reply: Sep 5, 2018 4:37 AM by Ivan Bozov RSS

    Load Functions

    Mayron Colville

      A normal statement in SQL in which you need to select specific options will be:

       

      SELECT *

       

      FROM Organization

      WHERE "Org_Name = 'CONSULTING'

      or "Org_Name" = 'ANALYTICS'

      or "Org_Name" = 'APPLICATION SERVICES'

      or "Org_Name" = 'BUSINESS PROCESS SERVICES'

      or "Org_Name" = 'Security'

      or "Org_Name" = 'ENTERPRISE & CLOUD APPS'

      or "Org_Name" = 'WORKPLACE & MOBILITY'

      or "Org_Name" = 'CLOUD, WORKLOAD PLATFORMS & ITO';

       

      But when we try translate this in QlikSense  Data Load Editor

       

      LOAD

      "Org_ID"

      "Location"

      "Table 1",

      "Table 2",

      "Table 3",

      "Table 4",

      "Org_Name"


      FROM [lib://Utilization/Organization.xlsx]

      (ooxml, embedded labels, table is Organization)

       

      WHERE "Org_Name = 'CONSULTING'

      or "Org_Name" = 'ANALYTICS'

      or "Org_Name" = 'APPLICATION SERVICES'

      or "Org_Name" = 'BUSINESS PROCESS SERVICES'

      or "Org_Name" = 'Security'

      or "Org_Name" = 'ENTERPRISE & CLOUD APPS'

      or "Org_Name" = 'WORKPLACE & MOBILITY'

      or "Org_Name" = 'CLOUD, WORKLOAD PLATFORMS & ITO';

       

      It's not pulling the data i want which brings me to my question.

       

      Is there another way or syntax that QS could recognize and i could pull the desired data from the File?

      Is the Where and Or statement not allowed in Data Load Editor to be use the way i'm using it?

      What could be the best way of getting the data?

        • Re: Load Functions
          m w

          I notice that you are missing a double quote in the first line. Other than that, your syntax should work.

          Is there a chance that some of the data in the Excel workbook might contain leading or trailing spaces?

            • Re: Load Functions
              Mayron Colville

              In the actual data the double quotes was there that's just a sample query i created to represent the query i'm currently using. cause the query run fine in MSSQL. but the data don't get  pulled in QS the tables are blank

            • Re: Load Functions
              Poojashri Bangera

              Hi,

              Try this:



              LOAD

              "Org_ID"

              "Location"

              "Table 1",

              "Table 2",

              "Table 3",

              "Table 4",

              "Org_Name"


              FROM [lib://Utilization/Organization.xlsx]

              (ooxml, embedded labels, table is Organization)

               

              WHERE wildmatch(Org_Name, 'CONSULTING', 'ANALYTICS', 'APPLICATION SERVICES', 'BUSINESS PROCESS SERVICES','Security', 'ENTERPRISE & CLOUD APPS', 'WORKPLACE & MOBILITY', 'CLOUD, WORKLOAD PLATFORMS & ITO');

              • Re: Load Functions
                Ivan Bozov

                You are also missing commas

                 

                LOAD

                "Org_ID",

                "Location",

                "Table 1",

                "Table 2",

                "Table 3",

                "Table 4",

                "Org_Name"

                FROM [lib://Utilization/Organization.xlsx]

                (ooxml, embedded labels, table is Organization)

                WHERE MATCH("Org_Name", 'CONSULTING', 'ANALYTICS', 'APPLICATION SERVICES', 'BUSINESS PROCESS SERVICES', 'Security', 'ENTERPRISE & CLOUD APPS', 'WORKPLACE & MOBILITY', 'CLOUD, WORKLOAD PLATFORMS & ITO');