Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I would like to ask if below is possible? I would like to find out customer's favourite category by date for each customer in Script level but I'm unable to figure out. Below is my dataset.
| CUSTOMER_NO | DATE_OF_PURCHASE | DIMENSION |
| CustomerA | 30/04/2017 | Bags |
| CustomerA | 30/04/2017 | Bags |
| CustomerA | 30/04/2017 | Shoes |
| CustomerA | 30/04/2017 | Accessories |
| CustomerA | 29/04/2017 | Shoes |
| CustomerA | 29/04/2017 | Shoes |
| CustomerA | 29/04/2017 | Bags |
| CustomerA | 29/04/2017 | Accessories |
| CustomerB | 29/04/2017 | Shoes |
| CustomerB | 29/04/2017 | Shoes |
| CustomerB | 29/04/2017 | Bags |
| CustomerB | 29/04/2017 | Accessories |
Expected Result:
| CUSTOMER_NO | DATE_OF_PURCHASE | DIMENSION |
| CustomerA | 30/04/2017 | Bags |
| CustomerA | 29/04/2017 | Shoes |
| CustomerB | 29/04/2017 | Shoes |
Thank you in advance!
I managed to get the highest info now by using FirstSortedValue and COUNT, but if the dataset is showing as below. The result will be blank. Is that a possibility auto populate a random value from Category if it is blank?
| CUSTOMER_NO | DATE_OF_PURCHASE | DIMENSION |
| CustomerB | 28/04/2017 | Bags |
| CustomerB | 28/04/2017 | Accessories |
Expected Result:
| CUSTOMER_NO | DATE_OF_PURCHASE | DIMENSION |
| CustomerB | 28/04/2017 | Bags |