Creating a Custom Usage Analytics dashboard
I want to utilize the Usage Analytics Dashboard that will give me these key insights/KPIs:
Metric | Description |
Views per day | Total number of views per day per dashboard |
Views per user | Number of views in the past 365 days, broken down by individual users. |
Total views | Number of views in the past 365 days. |
Total in organization | Count all dashboards or reports in the entire organization that had at least one view in the past 365 days. |
Rank: Total views | For total views of all dashboards or reports in the organization over the past 365 days, where does this dashboard or report rank. |
Is this achievable with the current Usage Analytics Elasticube model?
This is what I came up with regarding the KPIs that I was trying to achieve. I created a subquery to capture the number of views per dashboard based on the action 'dashboard. loads'. I ran the subquery from the DimDashboards dimensional table that has already been created and added a value called "Dashboardloads".
SELECT distinct o.DashboardID AS [Dashboard ID], o.dashboardPath AS [Dashboard Path], CASE WHEN StrParts(o.dashboardPath,'/',1) like '' THEN 'null' ELSE StrParts(o.dashboardPath,'/',1) END AS [Dashboard Folder], o.dashboardTitle AS [Dashboard Name], (SELECT Count(*) FROM FactActions WHERE FactActions.[Dashboard ID] = o.DashboardID AND FactActions.[Action] = 'dashboard.load') AS Dashboardloads FROM [usage] o WHERE o.[category] = 'Analytics'
The subquery:
(SELECT Count(*) FROM FactActions WHERE FactActions.[Dashboard ID] = o.DashboardID AND FactActions.[Action] = 'dashboard.load') AS Dashboardloads
Queries from FactActions where we have the DashboardID equals that DashboardId from Usage and the Action equates to 'dashboard.load'. From there I was able to use the RANK function from Sisense to see which Dashboards rank the highest.
Then I created another dimensional table called "FactUserDashboardLoadCount" where the query:
SELECT fa.[Dashboard ID], dd.[Dashboard Name], fa.[User ID], dm.[User Name], (SELECT COUNT(FactActions.[Dashboard ID]) FROM FactActions WHERE FactActions.[Dashboard ID] = fa.[Dashboard ID] AND FactActions.[User ID] = fa.[User ID] AND FactActions.[Action] = 'dashboard.load' ) AS LoadCount FROM FactActions fa LEFT JOIN DimUsers dm on fa.[User ID] = dm.[User ID] LEFT JOIN DimDashboards dd on fa.[Dashboard ID] = dd.[Dashboard ID] GROUP BY fa.[Dashboard ID], fa.[User ID], dm.[User Name], dd.[Dashboard Name]
Which counts all the dashboards, that have a Dashboard ID, User ID, and 'dashboard.load' to determine how many times a user has viewed a specific dashboard.
I believe this answers my questions and any feedback is welcomed.