Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
rjn
Employee
Employee

Finding a new customers using Set Analysis

I am looking for solution to display New customer List in pivot table based on user date selected using only Set Analysis, can’t change the data model.

 

For Ex: in below table if the user selects 4-Jan, the customer XYZ is existing Customer, but if user selects 3-Jan, then Customer XYZ is a New Customer.

 

End result is to hide all existing customer in a pivot table and display only New Customers details based on Date selected.

 

Date

ID

Customer

1-Jan

123

ABC

2-Jan

123

ABC

3-Jan

789

XYZ

4-Jan

789

XYZ

5-Jan

456

EFG

6-Jan

456

EFG

7-Jan

678

IJK

8-Jan

678

IJK

9-Jan

456

PQR

10-Jan

456

PQR

 

Any help would be highly appreciated.

4 Replies
Vegar
MVP
MVP

You can flag the new customers in the script then you can use set to filter the new ones.

Script:

LOAD Date,
ID,
Customer,
if(Exists(Customer), '0', '1') as _New
FROM DataSource;

Expression:

Count({<_New={1}>}Customer)

 

 

rjn
Employee
Employee
Author

thanks, but we are unable to make any changes or create new tables.

Need to achieve with only set Analysis in front end. 

Vegar
MVP
MVP

Try:

=count(aggr(min(Date), Customer))

tresesco
MVP
MVP

Try :

=Only({<Date,Customer=e({1<Date={"<$(=Max(Date))"}>}Customer)>}Customer)

1.PNG2.PNG3.PNG