March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a table containing user activity logs for a website.
Each row in the table represents a user visiting a specific page on the website.
UserId | PageId |
A | 1 |
A | 2 |
B | 1 |
C | 2 |
C | 1 |
C | 2 |
In the dummy table above, User A has visited 2 distinct pages, B has just visited 1 page and C has visited 2 distinct pages (they visited the same page twice).
I would like to make a reverse cumulative histogram showing how many users have viewed "X or more" number of pages.
The X-axis should have the following custom values:
and the corresponding bar at each point on the X-axis should represent the number of users with that many page views or more.
For example, using the dummy data above, we have 3 users with 1+ pages viewed and 2 users with 2+ pages viewed.
Solved! Go to Solution.
Hi @jamesleslie ,
Create a table with the following format to use on your x-axis:
Count | Minimum value |
1+ | 1 |
2+ | 2 |
3+ | 3 |
6+ | 6 |
11+ | 11 |
15+ | 15 |
Now add the following measure to your model:
Count Pages =
COUNTROWS (
FILTER (
SUMMARIZE (
ActivityLogs;
ActivityLogs[UserId];
"@PageViews"; DISTINCTCOUNT ( ActivityLogs[PageId] )
);
[@PageViews] >= SELECTEDVALUE ( 'AxisTable'[Minimum value] )
)
)
Check PBI file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @jamesleslie ,
Create a table with the following format to use on your x-axis:
Count | Minimum value |
1+ | 1 |
2+ | 2 |
3+ | 3 |
6+ | 6 |
11+ | 11 |
15+ | 15 |
Now add the following measure to your model:
Count Pages =
COUNTROWS (
FILTER (
SUMMARIZE (
ActivityLogs;
ActivityLogs[UserId];
"@PageViews"; DISTINCTCOUNT ( ActivityLogs[PageId] )
);
[@PageViews] >= SELECTEDVALUE ( 'AxisTable'[Minimum value] )
)
)
Check PBI file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |