Forum Discussion
Count events on dates based on condition
Hello Community
Hoping to get some assistance with the following.
I have a table of contents that has clients attending an event over various dates.
I want to count the events but only when there has been more than 4 clients attend over any given date .
Eg
| Visit Start Date | Client ID |
| 10/04/2024 | AC000001559 |
| 10/04/2024 | AC000072718 |
| 10/04/2024 | AC000637102 |
| 10/04/2024 | AC000876443 |
| 10/04/2024 | AC000949724 |
| 10/04/2024 | AC001095530 |
| 10/04/2024 | AC001118236 |
| 10/04/2024 | AC002313429 |
| 10/04/2024 | AC003762526 |
| 10/04/2024 | AC004373399 |
| 10/04/2024 | AC005013076 |
| 12/04/2024 | AC002313429 |
| 16/04/2024 | AC000001559 |
| 16/04/2024 | AC000857537 |
| 16/04/2024 | AC001032870 |
| 16/04/2024 | AC001070439 |
| 16/04/2024 | AC001118236 |
| 16/04/2024 | AC001743949 |
| 16/04/2024 | AC002564643 |
| 16/04/2024 | AC004049946 |
| 16/04/2024 | AC004228120 |
| 16/04/2024 | AC004269964 |
| 16/04/2024 | AC004373399 |
| 16/04/2024 | AC005013076 |
From the above , there are 3 dates. Only the 10th and 16th have a count of more than 4 clients.
The outcome im wishing to acheive is to have a measure to calculate the number of events and from the above the results should be 2.
Many Thanks
pls try this
Hi James_Galis1
You can produce your required output in many different ways and one of them is to create a separate calendar table from the min and max of your date field in your fact table, and then create a relationship with your calendar table and the fact table, and then write a dax formula like below to produce a visual like below.
I attach an example pbix file.
3 Replies
- AhmedxSuper User
- James_Galis1Helper II
Thank You
This works best for how i wish to present the data
Many thanks
- DataNinja777Super User
Hi James_Galis1
You can produce your required output in many different ways and one of them is to create a separate calendar table from the min and max of your date field in your fact table, and then create a relationship with your calendar table and the fact table, and then write a dax formula like below to produce a visual like below.
I attach an example pbix file.