Forum Discussion
Custom user metrics report
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.