Forum Discussion
Active Clients in time frame
- Anonymous3 years ago
Hi LeahS ,
I suggest you to create a measure as below to count the active clients.
Count Active Clients = VAR _SELECTSTART = MIN ( 'Date'[Date] ) VAR _SELECTEND = MAX ( 'Date'[Date] ) RETURN COUNTX ( FILTER ( 'Lincoln Client Info', 'Lincoln Client Info'[Start Date] <= _SELECTEND && OR ( 'Lincoln Client Info'[Discharge Date] >= _SELECTSTART, 'Lincoln Client Info'[Discharge Date] = BLANK () ) ), [Client] )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LeahS
Take a look at these two Quick Measures as I think you want something like them.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365
The first one works mostly, but I can't get the count right. I think my column names are off. Below is the measure I created. Can you tell me where I went wrong?
- Anonymous3 years agoNot applicable
Hi LeahS ,
I suggest you to create a measure as below to count the active clients.
Count Active Clients = VAR _SELECTSTART = MIN ( 'Date'[Date] ) VAR _SELECTEND = MAX ( 'Date'[Date] ) RETURN COUNTX ( FILTER ( 'Lincoln Client Info', 'Lincoln Client Info'[Start Date] <= _SELECTEND && OR ( 'Lincoln Client Info'[Discharge Date] >= _SELECTSTART, 'Lincoln Client Info'[Discharge Date] = BLANK () ) ), [Client] )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.