Hi Everyone,
I have a field as "Leave Type" which includes the following:
Short Term Disability, Short Term Disability Not Approved,Short Term Disability Gradual Return to Work,Long Term Disability, Long Term Disability Gradual Return to Work,Long Term Disability Not Approved, Emergency Leave, Maternity Leave, Maternity Short Term Disability, Parental Leave, Statutory Notice Leave, Personal Leave of Absence, Compassionate Family Medical Leave, Leave Other
I would like to categorize the above as follows:
STD= Short Term Disability, Short Term Disability Not Approved,Short Term Disability Gradual Return to Work
LTD= Long Term Disability Gradual Return to Work,Long Term Disability Not Approved, Emergency Leave,
Maternity/Parental = Maternity Leave, Maternity Short Term Disability, Parental Leave
Other= Statutory Notice Leave, Personal Leave of Absence, Compassionate Family Medical Leave, Leave Other
I would like to put this in a drill down stacked bar chart where once you click STD it will drill down to the sub categories.
What I wrote in the script is as follows:
If(WILDMATCH("Leave Type",'*Short*'), 'STD',
If(WILDMATCH("Leave Type",'*Long*','*Emergency*'), 'LTD',
If(WILDMATCH("Leave Type",'*Maternity*','*Parental*'), 'Maternity/Parental', 'Others'))) as Leave_Type2
This is not producing the correct results and I am getting a lot of null values.
I have attached a sample table as well
I appreciate your help on this.
You should take advantage of Applymap & Mapping table feature in Qlik