Forum Discussion
coolioaus
1 year agoNew Member
Creating concurrent usage data
Hi All, I'm new to Power BI and trying to get my head around something which is probably relatively simple. We have a system that tracks users signing in and out. This may be once per day or it m...
- 1 year ago
Hi coolioaus ,
The Solution I would use will go like this
The Below is the dataset I used for this purpose
Username Log In Time Log Out Time
user1 2024-06-11 23:37:35 2024-06-12 00:00:35 user1 2024-06-11 05:44:12 2024-06-11 05:54:12 user1 2024-06-11 02:43:11 2024-06-11 03:16:11 user2 2024-06-11 03:08:04 2024-06-11 03:55:04 user2 2024-06-11 11:11:15 2024-06-11 11:41:15 user2 2024-06-11 09:10:31 2024-06-11 10:56:31 user3 2024-06-11 17:49:07 2024-06-11 18:35:07 user3 2024-06-11 11:07:01 2024-06-11 12:00:01 user3 2024-06-11 20:55:09 2024-06-11 22:32:09 user4 2024-06-11 05:12:14 2024-06-11 06:54:14 user4 2024-06-11 00:32:34 2024-06-11 02:25:34 user4 2024-06-11 12:35:52 2024-06-11 14:17:52 user5 2024-06-11 19:36:17 2024-06-11 20:57:17 user5 2024-06-11 07:51:39 2024-06-11 08:14:39 user5 2024-06-11 04:09:19 2024-06-11 05:40:19 1. Create a TimeTable as below
TimeTable = GENERATESERIES( TIME(0,0,0), TIME(23,59,0), TIME(0,15,0) )2. Loaded the data into Power Query and extracted time as separate columns
You can do this using the Time Dropdown in Power Query Editor
3. Created the below DAX
ConcurrentSignIns = VAR CurrentTime = SELECTEDVALUE(TimeTable[Time]) RETURN COUNTROWS( FILTER( 'Table', 'Table'[LogInTime] <= CurrentTime && 'Table'[LogOutTime] >= CurrentTime ) )4. You can build a Line Chart, with Time from TimeTable in your X-axis and the ConcurrentSignIns measure on the Y-axis
Regards,
coolioaus
1 year agoNew Member
Thanks for all the responses. I have a working solution and learnt a lot!