Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Usage Metric Report - Custom Measure for Distinct Date and Report by User

Hi,

 

I'm connecting to the Usage Metric Report in my workspace via Power BI Desktop - I've saved the Usage Metric Report after viewing the report in the Workspace which then let's me connect to it as a datasource in Power BI Desktop. I'm doing this because I want to add in some additional measures that help make the report more usable for me.

 

In my workspace I have 3 reports. If one use views all 3 reports in one day I want this to total 3, regardless of the number of times each report is viewed in that day. Then I want to be able to roll this up across days and users.

 

At the moment the 2 standard count metrics don't give me what I'm looking for:

 

  • ViewsCount - this counts the number of pages in a report that were viewed. I only want to count if the report was viewed, not all it's pages
  • ViewersCout - this only give me the unique number of users

 

I'm able to get the total distinct days viewed by user using the following:

 

Viewed = CALCULATE(DISTINCTCOUNT(Views[Date]),GROUPBY(Users,Users[UserGuid]))
 
But this only gives me the days. If they've viewed more than one report in that day it doesn't count this. Below I've given a screenshot of the table of data to help illustrate what I'm trying to achieve:
 
In this example you'll see a column for Date (from Views table) and ReportGuid (from Views table) with the names of 3 Users (from Users table) in columns and a count of the times each report has been viewed, using the DAX calculation above. The totals are the bottom are only counting the unique days, not the unique days and report IDs. The real figures should be 1, 7 and 11.
 
Any suggestions?

MarkJames

  • Anonymous's avatar
    Anonymous
    7 years ago
    I figured it out:
     
    ReportViews = COUNTROWS(SUMMARIZE(Views,Views[Date],Views[ReportGuid],Users[FamilyName]))

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
    I figured it out:
     
    ReportViews = COUNTROWS(SUMMARIZE(Views,Views[Date],Views[ReportGuid],Users[FamilyName]))
  • Jaf017's avatar
    Jaf017
    Icon for Advocate III rankAdvocate III

    Anonymous - I've saved a copy of the usage metrics report and can customize it in the service. However, I'm not able to connect to the dataset in PBI Desktop. If you don't mind could you describe how you connected to the dataset in the Desktop? I see all of my other datasets in the workspace, but just not the usage metrics report.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Jaf017 ,

       

      I created a Usage Metric Report in the Service which creates a dataset. All I needed to do from there was go to Desktop and connect to a Power BI Datset. When the window appears I searched for the Workspace that containts the Usage Metric report - it's usually called Report Usage Metrics Model.


      Once you've connected you can create your own Usage Metric Report - you'll not be able to add calculated columns as it's a live connection.

       

      Hopefully that helps.

       

      Thanks,

      MarkJames

      • Jaf017's avatar
        Jaf017
        Icon for Advocate III rankAdvocate III

        Anonymous,

         

        I expected the Dataset to be named the same as the name we saved the Usage Metrics Report.

         

        But I was able to find Report Usage Metrics Model! Thanks for the help man!!!