Forum Discussion
PowerBI maximum Concurrent Callers - Stats DAX
Hi Anonymous
Iam assuming you have a date table and relationship is set properly. With that assumption, the below one should work, please try.
CALCULATE ( COUNT(Table1[User_ID]), FILTER( Table1, SELECTEDVALUE(Date_Table[DateTime]) >=Table1[Time_of_connection] && SELECTEDVALUE(DateTime) >=Table1[Time_of_Disconnection]) )
Thanks
Raj
- Anonymous8 years agoNot applicable
Anonymous wrote:Hi Anonymous
Iam assuming you have a date table and relationship is set properly. With that assumption, the below one should work, please try.
CALCULATE ( COUNT(Table1[User_ID]), FILTER( Table1, SELECTEDVALUE(Date_Table[DateTime]) >=Table1[Time_of_connection] && SELECTEDVALUE(DateTime) >=Table1[Time_of_Disconnection]) )
Thanks
Raj
Sorry for the spell mistake. The highlighted part should be <=.
- Anonymous8 years agoNot applicable
Hi my calendar table looks like this: i now need to do this by Minute/Hour
Calendar =
SELECTCOLUMNS (
CROSSJOIN (
CALENDAR (MIN(data[Time of Connection]), MAX(data[Time of Disconnection].[Date]) ),
DATATABLE (
"Hour", DATETIME,
{
{"00:01"},
{"00:02"},
{"00:03"},
{"00:04"},
{"00:05"},
{"00:06"},
{"00:07"},
{"00:08"},
{"00:09"},
{"00:10"},
{"00:11"},
{"00:12"},
{"00:13"},
{"00:14"},
{"00:15"},
{"00:16"},
{"00:17"},
{"00:18"},
{"00:19"},
{"00:20"},
{"00:21"},
{"00:22"},
{"00:23"},
{"00:24"},and so on until 23:59
}
)
),
"Date", [Date] + [Minute]
)what fields do i need to create the relationship between the Date and table? i currently have it set to Time_of_Connection and and the date table.
- v-yulgu-msft8 years agoMicrosoft Employee
Hi Anonymous,
Please format the data type of [Date] column in Calendar table to Date/Time, which is the same as data[Time of Connection] and data[Time of Disconnection].
Regards,
Yuliana Gu