Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I need to count, the number of sessionIDs per UserID per minute.
For example:
Number of User Id's = 10
Number of session Id's per userID = 2
Time = 12:01:00
So, In 1 minute there are 2 session Id's per userID.
Kindly suggest a measure of formula to calculate this.
Solved! Go to Solution.
Hi, @Anonymous
You can try the following methods.
Measure:
Count = CALCULATE(COUNT('Table'[sessionid]),ALLEXCEPT('Table','Table'[userid],'Table'[timestamp]))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Hello @Greg_Deckler
Have a look at the data.
timestamp | userid | sessionid |
18-02-2023 00:10 | 643908947718 | 88f4e231e88845d7bae5d058ee6fe979 |
18-02-2023 00:10 | 643908947718 | 88f4e231e88845d7bae5d058ee6fe980 |
18-02-2023 00:16 | 920047293738 | 88f4e231e88845d7bae5d058ee6fe981 |
18-02-2023 00:16 | 920047293738 | 88f4e231e88845d7bae5d058ee6fe982 |
18-02-2023 00:16 | 920047293739 | 88f4e231e88845d7bae5d058ee6fe983 |
18-02-2023 00:16 | 920047293739 | 88f4e231e88845d7bae5d058ee6fe984 |
18-02-2023 00:17 | 668112815240 | 88f4e231e88845d7bae5d058ee6fe985 |
18-02-2023 00:17 | 668112815240 | 88f4e231e88845d7bae5d058ee6fe986 |
18-02-2023 00:16 | 668112815241 | 88f4e231e88845d7bae5d058ee6fe987 |
18-02-2023 00:16 | 668112815241 | 88f4e231e88845d7bae5d058ee6fe988 |
18-02-2023 00:18 | 915280025426 | 88f4e231e88845d7bae5d058ee6fe989 |
18-02-2023 00:18 | 915280025426 | 88f4e231e88845d7bae5d058ee6fe990 |
18-02-2023 00:18 | 1111111111 | 88f4e231e88845d7bae5d058ee6fe991 |
18-02-2023 00:18 | 1111111111 | 88f4e231e88845d7bae5d058ee6fe992 |
18-02-2023 00:19 | 115586687127 | 88f4e231e88845d7bae5d058ee6fe993 |
18-02-2023 00:19 | 115586687127 | 88f4e231e88845d7bae5d058ee6fe994 |
18-02-2023 00:19 | 115586687129 | 88f4e231e88845d7bae5d058ee6fe995 |
18-02-2023 00:19 | 115586687129 | 88f4e231e88845d7bae5d058ee6fe996 |
18-02-2023 00:22 | 294198836543 | 88f4e231e88845d7bae5d058ee6fe997 |
18-02-2023 00:22 | 294198836543 | 88f4e231e88845d7bae5d058ee6fe998 |
So in a given minute, there are 2 session IDs per userID.
Can you help to create a measure to calculate this for a Large dataset?
Thanks in advance.
Regards,
AJP
Hi, @Anonymous
You can try the following methods.
Measure:
Count = CALCULATE(COUNT('Table'[sessionid]),ALLEXCEPT('Table','Table'[userid],'Table'[timestamp]))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Maybe this?
Measure = AVERAGEX(SUMMARIZE('Table',[timestamp],"__Count",DIVIDE(COUNTROWS('Table'),COUNTROWS(DISTINCT('Table'[userid])))),[__Count])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |