Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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))
Solved! Go to Solution.
@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...
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.
@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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
5 | |
3 | |
3 | |
2 |
User | Count |
---|---|
12 | |
9 | |
7 | |
2 | |
2 |