- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

How to count number of sessionIDs per userID per Minute?
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@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.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@Anonymous Maybe this?
Measure = AVERAGEX(SUMMARIZE('Table',[timestamp],"__Count",DIVIDE(COUNTROWS('Table'),COUNTROWS(DISTINCT('Table'[userid])))),[__Count])
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
10-05-2024 12:56 PM | |||
01-15-2025 09:38 AM | |||
Anonymous
| 03-10-2023 12:23 AM | ||
06-25-2024 05:40 AM | |||
03-01-2023 12:53 AM |
User | Count |
---|---|
123 | |
105 | |
84 | |
49 | |
46 |