Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
karan_kn
Creator II
Creator II

If count condition in load statement

When we filtering the current month:

If same ID's are coming multiple time flag as Old customer,

if New IDs are coming flag as New Customer,

using If condition in load statement

CustIDDateFlag
1

12/7/2015

2

1/25/2016

3

1/24/2017

4

2/16/2017

6

3/3/2017

711/7/2017
2
01/02.2018
Old Customer
9
01/07.2018
New Customer
4
01/11.2018
Old Customer
2 Replies
el_aprendiz111
Specialist
Specialist

Hi,

LOAD *, if(Exists(CustID),'Old Customer','New Customer') AS Flag;
LOAD CustID,
Sales_Date
FROM
Inventry.xlsx
(
ooxml, embedded labels, table is Sheet2);

karan_kn
Creator II
Creator II
Author

Thanks for your response, also help me to flag old customer by year,

Ex:

OrgID

2 - '< 2 Year'

4 -  '< 1 Year'

9 - 'New Customer'