Integrate Log Analytics with Power BI

Azure Monitor Logs provides an end-to-end solution for ingesting logs. From Log Analytics, Azure Monitor's user interface for querying logs, you can connect log data to Microsoft's Power BI data visualization platform.

This article explains how to feed data from Log Analytics into Power BI to produce reports and dashboards based on log data.

Note

You can use free Power BI features to integrate and create reports and dashboards. More advanced features, such as sharing your work, scheduled refreshes, dataflows, and incremental refresh might require purchasing a Power BI Pro or Premium account. For more information, see Learn more about Power BI pricing and features.

Prerequisites

Permissions required

  • To export the query to a .txt file that you can use in Power BI Desktop, you need Microsoft.OperationalInsights/workspaces/query/*/read permissions to the Log Analytics workspaces you query, as provided by the Log Analytics Reader built-in role, for example.
  • To create a new dataset based on your query directly in the Power BI service, you need Microsoft.OperationalInsights/workspaces/write permissions to the Log Analytics workspaces you query, as provided by the Log Analytics Contributor built-in role, for example.

Create Power BI datasets and reports from Log Analytics queries

From the Export menu in Log Analytics, select one of the two options for creating Power BI datasets and reports from your Log Analytics queries:

Screenshot showing Export to Power BI option in the Log Analytics Export menu.

  • Power BI (as an M query): This option exports the query (together with the connection string for the query) to a .txt file that you can use in Power BI Desktop. Use this option if you need to model or transform the data in ways that aren't available in the Power BI service. Otherwise, consider exporting the query as a new dataset.

Collect data with Power BI dataflows

Power BI dataflows also allow you to collect and store data. A dataflow is a type of cloud ETL (extract, transform, and load) process that helps you collect and prepare your data. A dataset is the "model" designed to help you connect different entities and model them for your needs.

Incremental refresh

Both Power BI datasets and Power BI dataflows have an incremental refresh option. Power BI dataflows and Power BI datasets support this feature. To use incremental refresh on dataflows, you need Power BI Premium.

Incremental refresh runs small queries and updates smaller amounts of data per run instead of ingesting all the data again and again when you run the query. You can save large amounts of data but add a new increment of data every time the query is run. This behavior is ideal for longer-running reports.

Power BI incremental refresh relies on the existence of a datetime field in the result set. Before you configure incremental refresh, make sure your Log Analytics query result set includes at least one datetime field.

To learn more and how to configure incremental refresh, see Power BI datasets and incremental refresh and Power BI dataflows and incremental refresh.

Reports and dashboards

After your data is sent to Power BI, you can continue to use Power BI to create reports and dashboards.

For more information, see Create and share your first Power BI report.

Next steps

Learn how to: