Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
jleefjcapital
Creator II
Creator II

Using "if statement" in load statement

I am using a panel dataset which contain two separate categories.  I would like to separate out by one of the categories.  For instance,  I have one category which is region, and the other as employment type.  I would like to write an if statement to only load the regions for a single employment type.  I tried using the following, but it keeps causing an error- "Field not found"   I think this statement implies that "management_occupations" is a field, but it's a value.  How should I change this so that it only pulls the regions where OCC_TITLE = "Management_Occupations"?

Thank you.

LOAD

    AREA_NAME as MSA,

    "LOC QUOTIENT" as LQ_MSA,

    H_MEDIAN,

    If("OCC_TITLE" = [Management Occupations], "OCC_TITLE", NULL) as Management_Occupation

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

(ooxml, embedded labels, table is MSA_dl);

10 Replies
MarcoWedel

you're welcome

regards

Marco