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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
kyleparsons4842
Frequent Visitor

Count how many users logged in simultaneously

Hello,

 

I'm having a hard time figuring out how to determine how many computers are logged in at the same time throughout the day.  I'd like to create a graph with the x-axis being time (continuous) and the y-axis being a count of how many computers are logged in at that given time, granular down to the minute. 

 

My data table has columns: 

  • ComputerID
  • StartTime
  • EndTime

 

I've found some solutions daily and hourly time frames, but I'm looking to see how to do it by minute and don't know if that is something I need to play with in the Date table? 

 

Any help you could provide would be appreciated!

 

Sample Data.PNG

 
 
1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @kyleparsons4842 

Yes, you have to create a datetime table with a minute step, smth like

 

CalendarTable = addcolumns(
generateseries(MIN('Table'[StartTime]), MAX('Table'[EndTime]), TIME (0,1,0 )), 
"are logged", 
calculate(count('Table'[ComputerID]), 'Table'[StartTime] <= EARLIER([Value]), 'Table'[EndTime]>=EARLIER([Value])))

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
az38
Community Champion
Community Champion

Hi @kyleparsons4842 

Yes, you have to create a datetime table with a minute step, smth like

 

CalendarTable = addcolumns(
generateseries(MIN('Table'[StartTime]), MAX('Table'[EndTime]), TIME (0,1,0 )), 
"are logged", 
calculate(count('Table'[ComputerID]), 'Table'[StartTime] <= EARLIER([Value]), 'Table'[EndTime]>=EARLIER([Value])))

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Thank you @az38 !  

 

This works! Thanks for the help! Only problem is that I can only get a couple days worth of data to work because I keep getting an error saying not enough memory.  Would you happen to know of a way that I can do the "are logged" column in a measure instead?  

@kyleparsons4842 

the better way to decrease memory consumption is to increase step of calculate to, for example 5 or 10 minutes.

I dont see any other appropriate way to get solution for your task with less resouces consumption


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 Makes sense.  Thank you for the help!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.