Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

Highlighted
kaviyarasan
New Contributor

Give some idea to implement this logic in Qliksense

TableName: 
AB
NA2
2NA
34
NANA
4321
53
Logic: 
if(or(A="NA",B="NA"),"NA",Sum(A)-sum(B))
  
2 Replies
mato32188
Contributor III

Re: Give some idea to implement this logic in Qliksense

Hi, 

if you want to create a new field (let's say "C") then in script editor:

Load

A,

B,

if(A='NA' OR B='NA', 'NA', A-B) as C

From YOUR FOLDER;

Then create simple sum(C) in your UI. 

 

kaviyarasan
New Contributor

Re: Give some idea to implement this logic in Qliksense

Hi, I already tried it. But its return "-" instead of "NA".Give some other options . Thanks