Forum Discussion

tagban's avatar
tagban
Helper I
2 years ago
Solved

People active during Date Range

I've gone thru a few dozen posts that seemingly asked t he same question but the answers never quite worked for me so I'm going to post this in hopes it helps me and others. We have members that join...
  • tagban's avatar
    tagban
    2 years ago
    Number of Active People = 
    VAR _selDateMin = MIN('Date'[Date])
    VAR _selDateMax = MAX('Date'[Date])
    RETURN
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[id] ),
            FILTER (
                'Table',
                'Table'[enrollment_start] <= _selDateMax
                    && (
                        'Table'[enrollment_end] >= _selDateMin
                            || ISBLANK ( 'Table'[enrollment_end] )
                    )
            )
        ) 

    This was the fix for this. It allows me to filter anyone that was active at some time during this time. This was largely thanks to you but this was the actual solution. I just needed to account for the MIN and MAX. 

    Thank you for all of your help Anonymous