Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
Ping-Guererro
Contributor
Contributor

Error Simple If statement

HI Guys, May i know what is the problem in my if statement? I'm trying to get the total adj_amt per dmd_flow_id (INDEM, PRDEM,PNDEM)

LDA:
LOAD 
Account_Number,
Payment_date,
dmd_flow_id,
adj_amt,
IF(dmd_flow_id='INDEM',SUM(adj_amt)) as Interest_collected;

SQL SELECT Account_Number,
Payment_date,
dmd_flow_id,
adj_amt
FROM `payment table`;

Thank you

 

 

 

4 Replies
zzyjordan
Creator II
Creator II

Hi,
Can you try below script and let me know whether it works or not?
LDA:
LOAD
Account_Number,
Payment_date,
dmd_flow_id,
adj_amt;

SQL SELECT Account_Number,
Payment_date,
dmd_flow_id,
adj_amt
FROM 'payment table';

left Join(LDA)
Load dmd_flow_id, sum(adj_amt) as Interest_collected
resident LDA
where dmd_flow_id='INDEM'
Group by dmd_flow_id

ZZ
Ping-Guererro
Contributor
Contributor
Author

Hi Sir, when i tried your code the error show: Field 'dmd_flow_id' not found.

Thank you

zzyjordan
Creator II
Creator II

try this

 

LDA:
LOAD
Account_Number,
Payment_date,
dmd_flow_id,
adj_amt;

SQL SELECT Account_Number,
Payment_date,
dmd_flow_id,
adj_amt
FROM 'payment table';

NoConcatenate

Final_LDA:
Load *
Resident LDA;

left Join(Final_LDA)
Load dmd_flow_id, sum(adj_amt) as Interest_collected
resident LDA
where dmd_flow_id='INDEM'
Group by dmd_flow_id;

drop Table LDA;

 

ZZ

sunny_talwar

What exactly are you trying to do? Can you explain this with an example?