Visualize data using a query imported into Power BI
Azure Data Explorer is a fast and highly scalable data exploration service for log and telemetry data. Power BI is a business analytics solution that lets you visualize your data and share the results across your organization.
Azure Data Explorer provides three options for connecting to data in Power BI: use the built-in connector, import a query from Azure Data Explorer, or use a SQL query. This article shows you how to import a query so that you can get data and visualize it in a Power BI report.
If you don't have an Azure subscription, create a free Azure account before you begin.
You need the following to complete this article:
- An organizational email account that is a member of Azure Active directory, so you can connect to the Azure Data Explorer help cluster.
- Power BI Desktop (select DOWNLOAD FREE).
- Power BI Desktop - Alternate Download Link.
- Azure Data Explorer desktop app.
Get data from Azure Data Explorer
First, you create a query in the Azure Data Explorer desktop app and export it for use in Power BI. Then, you connect to the Azure Data Explorer help cluster, and bring in a subset of the data from the StormEvents table. The StormEvents sample data set contains weather-related data from the National Centers for Environmental Information.
In a browser, go to https://help.kusto.windows.net/ to launch the Azure Data Explorer desktop app.
In the desktop app, copy the following query into the upper-right query window then run it.
StormEvents | sort by DamageCrops desc | take 1000
The first few rows of the result set should look similar to the following image.
On the Tools tab, select Query to Power BI then OK.
In Power BI Desktop, on the Home tab, select Get Data then Blank query.
In the Power Query Editor, on the Home tab, select Advanced editor.
In the Advanced editor window, paste the query you exported then select Done.
In the main Power Query Editor window, select Edit credentials. Select Organizational account, sign in, then select Connect.
On the Home tab, select Close & Apply.
Visualize data in a report
Now that you have data in Power BI Desktop, you can create reports based on that data. You'll create a simple report with a column chart that shows crop damage by state.
On the left side of the main Power BI window, select the report view.
In the VISUALIZATIONS pane, select the clustered column chart.
A blank chart is added to the canvas.
In the FIELDS list, select DamageCrops and State.
You now have a chart that shows the damage to crops for the top 1000 rows in the table.
Save the report.
Clean up resources
If you no longer need the report you created for this article, delete the Power BI Desktop (.pbix) file.
Submit and view feedback for