Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello all,
I have a data problem similar to this, the client has multiple purchases on different dates, i want to count the number of new users per year month
I only want to count the client on their first year month of purchase ->front end preferred
i have a table with all client information
client | purchase_Date |
a | 10/02/2022 |
a | 10/02/2022 |
a | 11/02/2023 |
a | 11/02/2023 |
b | 2/03/2022 |
b | 3/03/2022 |
b | 4/03/2022 |
c | 5/12/2022 |
Expected output: something like this
Feb-22 | 1 |
Mar-22 | 1 |
Dec-22 |
1 |
Thank you in advance , front end preferred
have a look at this
Here is the code that I used
Tab:
load * Inline
[
client,purchase_date
a,10/02/2022
a,10/02/2022
a,11/02/2023
a,11/02/2023
b,2/03/2022
b,3/03/2022
b,4/03/2022
c,5/12/2022
];
tab:
load
client,
min(purchase_date) as minvalue,
monthname(min(purchase_date)) as month,
1 as Flag
resident Tab
group by client;