Forum Discussion

heatherkw's avatar
heatherkw
Helper I
3 years ago
Solved

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...
  • heatherkw's avatar
    heatherkw
    3 years ago

    Thanks! It took me a while and quite a lot of tries and versions, but I made it work!

  • heatherkw's avatar
    heatherkw
    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])
    RETURN
    CALCULATE (
    DISTINCTCOUNT('CombinedTables'[PersonalID]),
    'CombinedTables'[EnrollmentEnd]> MinDate,
    'CombinedTables'[EnrollmentStart] <= MaxDate)