Forum Discussion
Custom user metrics report
I'm trying to create a customer user metrics report. I have created a local report on the user metrics datamodel, but I can't seem to replicate the viewscount that is shown is the auto-generated user metrics report. The viewerscount measure that is provided does give the same result as the standard report.
this is what the auto-generated report looks like. I can clearly see that I had 5 views and 4 unique users viewing my 'kredietacceptatie' report.
When I try to re-create this in Power BI Deskop and use the provided measure ViewsCount, I get a different number.
I am pretty sure this has to do with this ViewsCount measure registrating page level views instead of report level views.
I have tried different DAX measures, but I am not able to recreate the the Views from the auto-generated report.
I'm curious to learn if anyone has been able to tackle this problem or has any suggestions on what DAX measure will replicate the numbers from the standard report.
1 Reply
- bariscihanResolver II
Hi,
What you are seeing is expected and comes from how the auto-generated Usage Metrics report is calculated upstream versus what is exposed in the Usage Metrics dataset.
The standard report is effectively working on a sessionized, report-level semantic layer, while the dataset you connect to is event-level telemetry (page renders, interactions, navigation events, etc.). The built-in ViewsCount measure therefore tends to overcount compared to the standard report because it includes multiple events within a single viewing session.
In practice, the closest approximation is to reconstruct a session grain and then aggregate at report level:
Report Views = COUNTROWS ( SUMMARIZE ( UsageMetrics, UsageMetrics[ReportId], UsageMetrics[UserId], UsageMetrics[SessionId] ) )If SessionId is unreliable or not populated, you can approximate sessionization using time bucketing:
Report Views (Time Bucket Approx) = COUNTROWS ( SUMMARIZE ( UsageMetrics, UsageMetrics[ReportId], UsageMetrics[UserId], FORMAT ( UsageMetrics[Timestamp], "yyyymmddhh" ) ) )Technically, you will never get a 1:1 match with the auto-generated report because Microsoft applies additional filtering and normalization before the metrics are surfaced. The recommended approach is to define a consistent session-based view definition and use that across custom governance or adoption reports.
If you can share which Usage Metrics tables you are using, I can help refine the session grain further.
Hope this helps.