Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Count of Active Users In date range

Hi

I have a dataset like below 

User       Created Date      Last Date

Ami        01-06-2020        17-06-2020

Asi          03-07-2020        28-07-2020
Neel        06-07-2020       22-07-2020
Kamal     18-06-2020       16-07-2020
Soumya  14-07-2020       30-07-2020

I need the count of all active users in between a date range.
for ex- Neel was active in between 18th June to 1st July , so when i choose the date range in between 18th June & 1st July, Neel should be counted as one active User
Result should be something like this

Date                 Count of Active Users
01-06-2020              1
02-06-2020              1
..

..

08-07-2020              3

..
15-07-2020              4

Just curious to know Is this possible in Power bi???

Thanks
Amit

  • Hi Anonymous 

    take a look at the following solution:

     

     

    Count active User = 
    CALCULATE(
        COUNTROWS('Table'),
        FILTER(
            'Table',
            'Table'[Created Date] <= MIN('Calendar'[Date]) && 'Table'[Last Date] >= MIN('Calendar'[Date])
        )
    )

     

    Regards from the town where the legend of the Pied Piper of Hamelin is at home
    FrankAT (Proud to be a Datanaut)

5 Replies