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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
LanceM
Regular Visitor

Exclude usage metric reports from Embedded application

Hi,

I have an Angular 13 application that embeds Power BI reports.  I get all the reports from a workspaces and display them as links on the application for the user to choose which report to view.  I am getting the usage metric report coming over with the list of workspace reports.  Looking at the forums it says you need to filter out the usage reports after you get the list of reports.  This is fine but I cannot find any code showing how to do this.  Please can you provide some code or an explanation of how to filter the usage reports.

Thanks

3 REPLIES 3
LanceM
Regular Visitor

Hi @v-rzhou-msft

Thanks for your reply.  I am using the GetReportsInGroup in the Microsoft.PowerBI.Api nuget package called from C#.  I can figure out how to use the filter, but I can't find anywhere WHAT to filter in order to filter out the "Usage Metric Reports".  They seem to have the same attributes as normal user-created reports so I cannot see where they differ.  Please help.

Lance

LanceM
Regular Visitor

Hi @v-rzhou-msft thanks for your reply.  Yes I am using GetReportsInGroup in the Power BI Rest API to get my list of reports.  What I am after is the criteria to filter out from this list the usage metrics reports.  I have no problem filtering from a list, what I need is the properties to do this.  For example, if the report object had a property called report type and all the system generated usage metric reports had a report type value of "system" and the other reports had a report type value of "custom", I could easily filter out the system usage reports.  I cannot find any such property of the Report object to do a filter or if there was a method called something like GetNonSystemReportsInGroup. I could get what I need.  I don't mind filtering them out on the server or on the client in javascript but I don't see anyway of doing this. 

 

In this post https://community.powerbi.com/t5/Developer/remove-quot-report-usage-metrics-report-quot-showing-on-e... @v-jiascu-msft implied there was a way to do this but I couldn't find any code how to do this.

 

If you can, please help.

v-rzhou-msft
Community Support
Community Support

Hi @LanceM 

How did you get Web list of your reports from Power BI Workspace? Did you use Power BI Rest API?

If you use Power BI Rest API, I think you use "Get Reports in Group" Function.

Here is the offical blog about Get Reports in Group.

Here is a post with similar requirement to filter in API request.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.