Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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)
thanks, but we are unable to make any changes or create new tables.
Need to achieve with only set Analysis in front end.
Try :
=Only({<Date,Customer=e({1<Date={"<$(=Max(Date))"}>}Customer)>}Customer)