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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.