Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

karan_kn
Contributor

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
Valued Contributor

Re: If count condition in load statement

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
Contributor

Re: If count condition in load statement

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

Ex:

OrgID

2 - '< 2 Year'

4 -  '< 1 Year'

9 - 'New Customer'