4 Replies Latest reply: Jun 24, 2015 7:35 AM by Jes Lee RSS

    Is there an if then statement I can use in Qlik Sense Load Statement?

    Jes Lee

      I am working with a dataset with multiple fields of which I would like to create dimensions for two.  What is the best way to create a dimension for the fields?


      I tried using an IF statement, but it results in an error.   I'm not sure what I'm doing wrong, but this is what I've tried.   Can anyone provide some insight?







          State as STATE,

          AREA_NAME as MSA,

      If("OCC_TITLE" = 'Accountants and Auditors',  

          EMP_PRSE as EMP_PRSE_Accountants_Auditors,

          "LOC QUOTIENT" as "LOC QUOTIENT_Accountants_Auditors",

          H_MEAN as H_MEAN_Accountants_Auditors,

          A_MEAN as A_MEAN_Accountants_Auditors,

          MEAN_PRSE as MEAN_PRSE_Accountants_Auditors,

          H_MEDIAN as H_MEDIAN_Accountants_Auditors,

          A_MEDIAN as A_MEDIAN_Accountants_Auditors, Null())

      FROM [lib://Employment/MSA_M2014_dl.xlsx]

      (ooxml, embedded labels, table is MSA_dl);