Good morning, everyone,
Thanks in advance for the help. I have a question for a long time and I do not know how to solve it. I work with a table that I simulate below.
I want to know how to count customers for dates that I mark on the calendar, as long as they have not bought before. Ahem: If I mark in the calendar the dates from 21/11 to 24/11, the number of different clients is 5. Now, if I march alone on 11/23, then it's 2. What I want to achieve is that if I mark the day 24/11 instead of counting 5, only count me 2 (customer 3 and 5), since customers 1, 2 and 4 have bought on previous dates.
I hope I haven't messed up too much.
Thank you again for your help.
Greetings
Solved! Go to Solution.
Hi @Syndicate_Admin ,
According to your description, here's my solution. Create a calculated column.
Count =
SUMX (
FILTER (
'Table',
'Table'[Clients] = EARLIER ( 'Table'[Clients] )
&& 'Table'[Date of purchase] = EARLIER ( 'Table'[Date of purchase] )
),
IF (
COUNTROWS (
FILTER (
'Table',
'Table'[Clients] = EARLIER ( 'Table'[Clients] )
&& 'Table'[Date of purchase] < EARLIER ( 'Table'[Date of purchase] )
)
) + 0 = 0,
1
)
)
Put Date and the new column in a visual, get the correct result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
According to your description, here's my solution. Create a calculated column.
Count =
SUMX (
FILTER (
'Table',
'Table'[Clients] = EARLIER ( 'Table'[Clients] )
&& 'Table'[Date of purchase] = EARLIER ( 'Table'[Date of purchase] )
),
IF (
COUNTROWS (
FILTER (
'Table',
'Table'[Clients] = EARLIER ( 'Table'[Clients] )
&& 'Table'[Date of purchase] < EARLIER ( 'Table'[Date of purchase] )
)
) + 0 = 0,
1
)
)
Put Date and the new column in a visual, get the correct result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
please provide the sample data in text form.
Proud to be a Super User!
The example table.
Clients | Date of purchase | Units |
Client 1 | 21/11/2022 | 35 |
Client 2 | 22/11/2022 | 48 |
Client 1 | 23/11/2022 | 12 |
Client 3 | 24/11/2022 | 24 |
Client 4 | 23/11/2022 | 56 |
Client 2 | 24/11/2022 | 24 |
Client 1 | 24/11/2022 | 36 |
Client 4 | 24/11/2022 | 12 |
Clinete 5 | 24/11/2022 | 18 |
The idea is to know for any day, the number of unique customers who have not bought since 21/11
Thank you
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
Join the biggest FREE Business Applications Event in LATAM this February.
User | Count |
---|---|
215 | |
58 | |
49 | |
46 | |
45 |
User | Count |
---|---|
265 | |
211 | |
113 | |
82 | |
71 |