Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

take a look at the following solution:

 

26-08-_2020_16-37-05.png

 

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)

View solution in original post

5 REPLIES 5
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

take a look at the following solution:

 

26-08-_2020_16-37-05.png

 

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)

@FrankAT Hi Frank, I've tried this for my issue which is similar, but doesn't appear to be working.   What is the relationship between the two tables, 'Calendar' and 'Table'?  It is simply 'Calendar'[Date] to 'Table'[Created Date}?  If so, that is analogous to what I have.   Thanks in advance.

Anonymous
Not applicable

Thank you

It is working

amitchandak
Super User
Super User

@Anonymous ,

Refer the blog on a very similar topic

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@Anonymous  - This is Open Tickets - https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364#M147



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.