Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
opejoseph
New Member

How does PBI Report Server calculate usage

SO I HAVE THIS CODE SNIPPET TO GET USAGE METRICS FOR USERS THAT VIEW DASHBOARDS MORE THAN 1 MINUTES, I DON'T TRUST THE QUERY RESULTS. But my main question is, why does the execution log table shows that users view reports in 1, 3 seconds? Is that time not too short to even load a report, talkless filtering visualizations.Is there a better way to write this query or get usage metrics?

(the code snippet has been anonymized)


SELECT c.[name] AS dashboardName,
SUBSTRING(e.username, CHARINDEX('\', e.username) + 1, LEN(e.username)) AS reportUser,
SUM(COUNT(*)) OVER (PARTITION BY c.[name], SUBSTRING(e.username, CHARINDEX('\', e.username) + 1, LEN(e.username))) AS Views,
CAST(SUM(DATEDIFF(SECOND, e.TimeStart, e.TimeEnd)) AS NUMERIC(18, 0)) AS TotalSeconds,
CAST(AVG(DATEDIFF(SECOND, e.TimeStart, e.TimeEnd)) AS NUMERIC(18, 0)) AS AverageSeconds,
SUBSTRING(u.username, CHARINDEX('\', u.username) + 1, LEN(u.username)) AS dashboardBuilder
FROM [Server].[dbo].[Catalog] c
INNER JOIN [Server].[dbo].[executionlogstorage] e ON c.itemid = e.reportid
INNER JOIN [Server].[dbo].[users] u ON c.modifiedbyid = u.userid
WHERE e.TimeStart between 'XXXX-XX-XX' and 'XXXX-XX-XX'
AND e.UserName NOT IN ('PowerBIReportServer','T SERVICE\PowerBIReportServer')
AND DATEDIFF(ss, e.TimeStart, e.TimeEnd) >= 60
AND SUBSTRING(e.username, CHARINDEX('\', e.username) + 1, LEN(e.username)) != 'PowerBIReportServer'
GROUP BY c.[name], SUBSTRING(e.username, CHARINDEX('\', e.username) + 1, LEN(e.username)), SUBSTRING(u.username, CHARINDEX('\', u.username) + 1, LEN(u.username))

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User


@opejoseph wrote:

But my main question is, why does the execution log table shows that users view reports in 1, 3 seconds? Is that time not too short to even load a report, talkless filtering visualizations.

 


This is because the server sends the report metadata for Power BI Reports to the user's browser and the rendering then happens in the browser and the server is unaware of how long the user has the report page open after it has sent the data to the browser.

There is no good solution for capturing the time viewing a report. You also cannot tell if the user is still looking at the report or if they have opened another browser tab... 

View solution in original post

3 REPLIES 3
d_gosbell
Super User
Super User

You can capture how many people access a report and how often they open it. You just cannot get how long they had it sitting on their screen.

d_gosbell
Super User
Super User


@opejoseph wrote:

But my main question is, why does the execution log table shows that users view reports in 1, 3 seconds? Is that time not too short to even load a report, talkless filtering visualizations.

 


This is because the server sends the report metadata for Power BI Reports to the user's browser and the rendering then happens in the browser and the server is unaware of how long the user has the report page open after it has sent the data to the browser.

There is no good solution for capturing the time viewing a report. You also cannot tell if the user is still looking at the report or if they have opened another browser tab... 

safe to say we can only capture what the usage will be like but not exactly what it is right?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.