If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hi guys,
i am creating a new filed called Survey? (in the script editor) based on the following condition:
if( A > B, 'Survey', 'No Survey') as [Survey?],
The problem is that field B is not in the source data but I am mapping it using MAPPING LOAD/APPLYMAP.
Sense gives me the error that Field B cannot be found.
Is there a solution to this?
try
LOAD
ApplyMap('SurveryLimit',"Claim To Code",'#N/A') as "Survey Limit ($)",
Region,
Subs,
"Claim No.",
"Claim To Code",
Amount,
if("Amount" >ApplyMap('SurveryLimit',"Claim To Code",'#N/A'), 'Survey', 'No Survey') as [Survey?]
FROM [Table.xlsx];
please post the entire script to help you.
Please share your script ...
Share a screenshot of your script
This is the current script:
LOAD
ApplyMap('SurveryLimit',"Claim To Code",'#N/A') as "Survey Limit ($)",
Region,
Subs,
"Claim No.",
"Claim To Code",
Amount,
if("Amount" > "Survey Limit ($)", 'Survey', 'No Survey') as [Survey?],
FROM [Table.xlsx];
try
LOAD
ApplyMap('SurveryLimit',"Claim To Code",'#N/A') as "Survey Limit ($)",
Region,
Subs,
"Claim No.",
"Claim To Code",
Amount,
if("Amount" >ApplyMap('SurveryLimit',"Claim To Code",'#N/A'), 'Survey', 'No Survey') as [Survey?]
FROM [Table.xlsx];
also check whether applymap is giving any value in return
try with the below script:
LOAD *,
if("Amount" > "Survey Limit ($)", 'Survey', 'No Survey') as [Survey?];
LOAD
ApplyMap('SurveryLimit',"Claim To Code",'#N/A') as "Survey Limit ($)",
Region,
Subs,
"Claim No.",
"Claim To Code",
Amount
FROM [Table.xlsx];
Try using the below script:
TAB1:
LOAD
ApplyMap('SurveryLimit',"Claim To Code",'#N/A') as "Survey Limit ($)",
Region,
Subs,
"Claim No.",
"Claim To Code",
Amount
FROM [Table.xlsx];
TAB2:
LOAD
if("Amount" > "Survey Limit ($)", 'Survey', 'No Survey') as [Survey?],
"Survey Limit ($)",
Region,
Subs,
"Claim No.",
"Claim To Code",
Amount
RESIDENT TAB1;
DROP TABLE TAB1;