Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
@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)
So if i select year 2020 i would like to get how many new custoers are available for every agent.
Are you hoping to see AB = 1 and AR = 1?
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
@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)