- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Field Not Found!!
Hi All,
I have tried to run the below code, but it keeps coming up with CASE_TYPE Field not found error anytime I run the script, while the field clearly is on the database because I pull the field using my SELECT statement.
Code:
IF([TIER]='GOLD',
if(match([Case_Type],'Incident'),
IF([DECODE_PRIORITY]='High' AND [Arrival to Resolve Days]<=1,'SLA MET',
IF([DECODE_PRIORITY]='Urgent' AND [Arrival to Resolve Days]<=1,'SLA MET',
If([DECODE_PRIORITY]='Medium' AND [Arrival to Resolve Days]<=3,'SLA MET',
IF([DECODE_PRIORITY]='Low' AND [Arrival to Resolve Days]<=10,'SLA MET','SLA Not Met'))))),
IF([TIER]='GOLD',
if(match([Case_Type],'Request'),
IF([DECODE_PRIORITY]='High' AND [Arrival to Resolve Days]<=1,'SLA MET',
IF([DECODE_PRIORITY]='Urgent' AND [Arrival to Resolve Days]<=1,'SLA MET',
If([DECODE_PRIORITY]='Medium' AND [Arrival to Resolve Days]<=5,'SLA MET',
IF([DECODE_PRIORITY]='Low' AND [Arrival to Resolve Days]<=10,'SLA MET','SLA Not Met'))))),
IF([TIER] = 'SILVER',
IF([DECODE_PRIORITY]='High' AND [Arrival to Resolve Days]<=3,'SLA MET',
IF([DECODE_PRIORITY]='Urgent' AND [Arrival to Resolve Days]<=3,'SLA MET',
IF([DECODE_PRIORITY]='Medium' AND [Arrival to Resolve Days]<=10,'SLA MET',
IF([DECODE_PRIORITY]='Low' AND [Arrival to Resolve Days]<=20,'SLA MET','SLA Not Met'))))))) as SLA;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then based on Bill analysis, try to change your load part:
if(match([CASE_TYPE],'Incident'),
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you share your whole script of this table?
With the load AND select statements?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Omar,
Please find the attached script. ignore the commented out codes, as I am only trying to test LOAD STATEMENT lines of codes. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For this bit of your script that is part of your sql query :
Decode(case_type ,0,'Incident'
,1,'Request'
,2,'Request') AS Case_Type
Put Case_Type in double quotes
Decode(case_type ,0,'Incident'
,1,'Request'
,2,'Request') AS "Case_Type"
Most variants of SQL databases will auto convert the field name to uppercase without the double quotes and Qlik is case sensitive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bill,
When I did this, it gave me an error with the connector.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then based on Bill analysis, try to change your load part:
if(match([CASE_TYPE],'Incident'),
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know this is elementary, but have you considered only doing the first little section. Test that, Make sure it works, then add the rest of the script. The match will return a value, then an evaluation of true/false will be the result from the number returned.
-gw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!! this works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Victor,
What are the values in the field which is causing you error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its the field CASE_TYPE, but Omar has resolved it for me, I had to make it upper case.