Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
amruta_j
Partner - Contributor III
Partner - Contributor III

Identify new Customers for Current Month

Hi All,

Below is the scenario:

I need to identify new customers for the selected current month , comparing them with the values of previous month.

eg: if 01/01/2018 has customers - a1,a2 and month=01/02/2018 has customers- a2,a3 .

if i select month=feb , the new customer name i.e a3 should be displayed in straight table.

Thank You in advance !

1 Solution

Accepted Solutions
amruta_j
Partner - Contributor III
Partner - Contributor III
Author

Below are the solutions that worked for this situation :

Backend:

Created a flag using

load
Month,
Customer,
if(Previous(Customer)=Customer,'Old','New') ascc
resident table
OrderbyCustomer,Month;

and
straight table dimension

=if(cc='New',Customer)


FrontEnd:

Dim=if(not isnull(Month),Customer)

Exp1- =count(DISTINCT Customer)

Exp2-=if(Count({<Month={'<$(=max(Month))'},Customer=P({<Customer>})>}Customer)>0,'No','Yes')

View solution in original post

2 Replies
Sergey_Shuklin
Specialist
Specialist

Hello!

You can use Left Join with addmonths(*, 1) for such tasks:

new_cust.png

All that is null is a new customer.

amruta_j
Partner - Contributor III
Partner - Contributor III
Author

Below are the solutions that worked for this situation :

Backend:

Created a flag using

load
Month,
Customer,
if(Previous(Customer)=Customer,'Old','New') ascc
resident table
OrderbyCustomer,Month;

and
straight table dimension

=if(cc='New',Customer)


FrontEnd:

Dim=if(not isnull(Month),Customer)

Exp1- =count(DISTINCT Customer)

Exp2-=if(Count({<Month={'<$(=max(Month))'},Customer=P({<Customer>})>}Customer)>0,'No','Yes')