Discussion board where members can get started with Qlik Sense.
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())
(ooxml, embedded labels, table is MSA_dl);
You can not use AS in this way
you IF statement should be in form :
so if(If("OCC_TITLE" = 'Accountants and Auditors', something,somethingelse) as EMP_PRSE
Can you post your data?
This is the data I'm working with.
if( OCC_TITLE= 'Accountants and Auditors', EMP_PRSE) as EMP_PRSE_Accountants_Auditors,
if( OCC_TITLE= 'Accountants and Auditors', [LOC QUOTIENT])as LOC_QUOTIENT_Accountants_Auditors,
..and so one..
How To /Missing Manual(18 articles)
I just realized that Qlik automatically designates the OCC_TITLE as a dimension. How silly of me. I was able to get the desired result from the front end.