Forum Discussion
heatherkw
3 years agoHelper I
Determine Active Clients At Any Point in Time
Hello, I'm pretty new to Power BI and DAX, and am trying to wrap my brain around how to do something. We have clients that come in and out of our system and need a way to determine if they are ac...
- 3 years ago
Thanks! It took me a while and quite a lot of tries and versions, but I made it work!
- 2 years ago
Sure! I use this calculation all of the time now. It usually looks something like this:
ActiveClients =VAR MinDate = FIRSTDATE('Date'[Date])VAR MaxDate = LASTDATE('Date'[Date])RETURNCALCULATE (DISTINCTCOUNT('CombinedTables'[PersonalID]),'CombinedTables'[EnrollmentEnd]> MinDate,'CombinedTables'[EnrollmentStart] <= MaxDate)
ThomasSan
2 years agoHelper IV
Would you please share your solution with the community? After all, this is why this community exists
heatherkw
2 years agoHelper I
Sure! I use this calculation all of the time now. It usually looks something like this:
ActiveClients =
VAR MinDate = FIRSTDATE('Date'[Date])
VAR MaxDate = LASTDATE('Date'[Date])
RETURN
CALCULATE (
DISTINCTCOUNT('CombinedTables'[PersonalID]),
'CombinedTables'[EnrollmentEnd]> MinDate,
'CombinedTables'[EnrollmentStart] <= MaxDate)