Forum Discussion
neilmc
3 years agoFrequent Visitor
Monthly data on closed cases
Hello,
I have tried to look at the various ongoing total help but am struggling - any advice gratefully recieved.
I have client data with a start date and end date (I have a calendar table as a date table)
| Id | StartDate | EndDate |
| 1 | 25/05/2022 23:00 | 23/10/2022 23:00 |
| 2 | 09/04/2019 23:00 | 13/12/2021 00:00 |
| 3 | 11/05/2021 23:00 | 20/01/2022 00:00 |
| 4 | 23/04/2023 23:00 | 29/05/2023 23:00 |
| 5 | 14/04/2021 23:00 | 10/08/2021 23:00 |
What I would like to be able to do is calculate an ongoing Total clients that are open in a month within a year - not a monthly total but a overall total in that calendar month - if that makes sense!
eg
Jan 2022 = 203 clients were open
Feb 2022 = 199 Clients were open
Jan 2023 = 250 clients were open
Feb 2023 = 249 clients were open
Any help gratefully recieved
do not create the relationship between fact table and date table.
pls try this
Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[StartDate]<=max('Table 2'[Date])&&('Table'[EndDate]>=min('Table 2'[Date])||ISBLANK('Table'[EndDate]))))pls see the attachment below