Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlaf_93
Creator II
Creator II

New customers analysis

good morning to everyone,

i would like to analyze which agents get most new customers.

So if for example i have fields like:

LOAD * INLINE[

AGENT, CUSTOMER, SALES, YEAR,

AB,11,20,2020,

AS, 22, 30, 2019,

AB, 13, 40,2019,

AR,14,29,2020];

What do i need to do?

 

1 Solution

Accepted Solutions
Kushal_Chawda

@Carlaf_93  try below

Data:
LOAD * INLINE[
AGENT, CUSTOMER, SALES, YEAR,
AB,11,20,2020,
AB,17,26,2020,
AB,12,20,2020,
AS, 22, 30, 2019,
AB, 13, 40,2019,
AB,12,20,2019,
AR,14,29,2020];

New:
NoConcatenate
LOAD *,
     if(CUSTOMER<>Previous(CUSTOMER),1,0) as New_Customer_Flag
Resident Data
Order by CUSTOMER,YEAR;

DROP Table Data;

 

Create a chart with Dimension Agent below expression

=sum(New_Customer_Flag)

 

Screenshot 2020-09-14 230543.png 

View solution in original post

4 Replies
Carlaf_93
Creator II
Creator II
Author

So if i select year 2020 i would like to get how many new custoers are available for every agent.

sunny_talwar

Are you hoping to see AB = 1 and AR = 1?

Carlaf_93
Creator II
Creator II
Author

yes.

LOAD * INLINE[

AGENT, CUSTOMER, SALES, YEAR,

AB,11,20,2020,
AB,17,26,2020,

AB,12,20,2020,

AS, 22, 30, 2019,

AB, 13, 40,2019,

AB,12,20,2019,

AR,14,29,2020];

 

with tose i would get  AB=2 , AR=1

Kushal_Chawda

@Carlaf_93  try below

Data:
LOAD * INLINE[
AGENT, CUSTOMER, SALES, YEAR,
AB,11,20,2020,
AB,17,26,2020,
AB,12,20,2020,
AS, 22, 30, 2019,
AB, 13, 40,2019,
AB,12,20,2019,
AR,14,29,2020];

New:
NoConcatenate
LOAD *,
     if(CUSTOMER<>Previous(CUSTOMER),1,0) as New_Customer_Flag
Resident Data
Order by CUSTOMER,YEAR;

DROP Table Data;

 

Create a chart with Dimension Agent below expression

=sum(New_Customer_Flag)

 

Screenshot 2020-09-14 230543.png