The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a table with users that start and end a connection
Table1
Users START_TIME_UTC END_TIME_UTC
User1 2019-07-12 01:00:31.000 2019-07-12 04:30:00.000
User2 2019-07-12 02:22:00.000 2019-07-12 04:22:29.000
User1 2019-07-12 03:14:28.000 2019-07-12 04:20:00.000
User3 2019-07-12 01:05:00.000 2019-07-12 06:05:24.000
I create a table in DAX with DATETIME increasing un hour until today
Table2
DATETIME COUNTUSERSCONNECT
2019-07-12 01:00:00 0
2019-07-12 02:00:00 2
2019-07-12 03:00:00 3
2019-07-12 04:00:00 4
2019-07-12 05:00:00 1
2019-07-12 06:00:00 1
2019-07-12 07:00:00 0
I don't know how calculate or COUNTUSERSCONNECT, it should check datetime with table1 and count how many users are connected in this hour.
I try it, but doesn't work
COUNTUSERSCONNECT =
COUNTAX (
table1,
AND (
table1[START_TIME_UTC] < table2[DateTime],
table1[END_TIME_UTC] > table2[DateTime]
)
)
It count everthing.
Solved! Go to Solution.
Hi,
I am not sure if I understood correctly your question.
Please try the below.
It is for creating a new column.
Hi,
I am not sure if I understood correctly your question.
Please try the below.
It is for creating a new column.
User | Count |
---|---|
28 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |