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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to store usage data for more long time than 30 or 90 days

The usage metric report is really usefull to monitor usages of dashboards.

We can create our own dashboard using data model, but I don't know how to expend the historic of data / metrics more than 90 days.

I see a solution user powershell to catch data from APIs but it's not easy to set-up...

There is anybody who find a way to manage the situation ? 

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @Anonymous ,

 

One possible method is to use the audit logs from Office 365 or the activity logs from Power BI REST API. These logs can provide more detailed information about who accessed your reports, when they accessed them, and what actions they performed on them. You can then store these logs in a data source that you can connect to Power BI later.

Another possible method is to use PowerShell scripts to automate the process of fetching data from APIs and storing it in a data source. This can be useful if you have a large number of reports or if you want to customize the frequency and format of the data.

 

Here are the steps you can follow to set this up:

- Go to the Azure portal and register an application in Azure Active Directory to get the necessary credentials (Application ID, Directory (tenant) ID, and Secret).

- Assign the required permissions to the application for the Power BI API.

- Utilize the Power BI REST API to access the usage metrics. Specifically, you can use the `GetActivityEvents` endpoint to retrieve the activity data.

Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn

- Create a PowerShell script or a console application that uses the registered Azure AD application credentials to authenticate and call the Power BI API.

- Schedule the script/application to run at regular intervals (e.g., daily) to retrieve the latest usage metrics.

- Store the Data.

- Create a Custom Usage Metrics Report.

 

Best Regards,

Neeko Tang

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

View solution in original post

1 REPLY 1
v-tangjie-msft
Community Support
Community Support

Hi @Anonymous ,

 

One possible method is to use the audit logs from Office 365 or the activity logs from Power BI REST API. These logs can provide more detailed information about who accessed your reports, when they accessed them, and what actions they performed on them. You can then store these logs in a data source that you can connect to Power BI later.

Another possible method is to use PowerShell scripts to automate the process of fetching data from APIs and storing it in a data source. This can be useful if you have a large number of reports or if you want to customize the frequency and format of the data.

 

Here are the steps you can follow to set this up:

- Go to the Azure portal and register an application in Azure Active Directory to get the necessary credentials (Application ID, Directory (tenant) ID, and Secret).

- Assign the required permissions to the application for the Power BI API.

- Utilize the Power BI REST API to access the usage metrics. Specifically, you can use the `GetActivityEvents` endpoint to retrieve the activity data.

Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn

- Create a PowerShell script or a console application that uses the registered Azure AD application credentials to authenticate and call the Power BI API.

- Schedule the script/application to run at regular intervals (e.g., daily) to retrieve the latest usage metrics.

- Store the Data.

- Create a Custom Usage Metrics Report.

 

Best Regards,

Neeko Tang

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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