Forum Discussion
Get Dataset from semantic model in Application insights
- 1 year ago
Hi MarynaBan,
Apologies for the late reply. After reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:
There is no direct built-in feature in Power BI Service to capture API calls, but you can use the following workarounds to track API requests being sent from Power BI:
As your Power BI model operates in Direct Query mode, you can utilize DAX Studio to capture the executed queries. Using DAX Studio open the application and connect it to your Power BI model. Then, enable query tracing by navigating to the Advanced tab and selecting Enable All Queries under the Tracing section. After enabling this setting, refresh your Power BI report.
SQL Profiler can be utilized to monitor Direct Query activity in Power BI. To start, install SQL Profiler from SQL Server Management Studio. Then, connect to Power BI Desktop's local instance by opening DAX Studio, going to the Advanced tab, and copying the Localhost connection string. Open SQL Server Profiler and connect to this instance. Initiate a new trace and refresh the Power BI report to capture Direct Query requests, enabling effective monitoring of API calls.
SQL Server Profiler - SQL Server Profiler | Microsoft Learn
Since the report is published to Power BI Service, you can review the dataset logs to analyse API activity. Navigate to Power BI Service and select the relevant dataset. Then, go to Settings and check the Data source credentials section for any available API details. If the API details are not visible, you can try extracting logs by accessing the Workspace, clicking on Dataset Refresh History, and reviewing any failed refresh attempts. These failures may provide insights into API call details.
Capture API requests directly from Power BI using Fiddler or browser dev tools. Install Fiddler Classic, then open Fiddler and start capturing network traffic. Open Power BI Desktop and refresh the report. Look for requests to api.applicationinsights.io. Extract the exact API query used. Using Browser Dev Tools for Power BI Service: Open your Power BI Report in a browser. Press F12 to open Developer Tools. Go to the Network tab → Filter for applicationinsights.io. Refresh the report and look for the full API request.If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi MarynaBan,
Thank you for reaching out to the Microsoft fabric community forum. After reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:
Power BI does not store raw datasets it connects to external data sources (in this case, Azure Application Insights) and retrieves data using API queries. Based on the image, Power BI is using Web API connections to pull data dynamically from Azure Application Insights.
However, Power BI does not directly expose the query that was used to retrieve this data in the semantic model. To find the dataset in Azure Application Insights, you need to trace the API calls used in Power BI.
To find what data is being retrieved from Azure Application Insights, follow these steps: Go to Power BI Desktop → Transform Data (this opens Power Query Editor). In the Queries pane, look for the queries that reference Application Insights. Click on the Advanced Editor for each query to view the exact API calls. You will see a Web.Contents() function that calls the Application Insights API.
Once you have identified the query from Power BI: Open the Azure Portal and go to Azure Application Insights. Select the Application Insights instance that matches the {APP_ID} from the Power BI query. Open the Logs (Analytics) section. Run the extracted query (QUERY_STRING) inside the Kusto Query Language (KQL) editor to view the dataset.
Compare the data returned in Azure Application Insights Logs (KQL editor) with what is shown in Power BI. Ensure the query retrieves the expected results and matches what is used in Power BI.
Use Power BI Data Model to Trace Queries. If the API queries are complex, you can: In Power BI Desktop, go to Model View. Identify the tables related to Application Insights. Right-click on a table and select Properties → Query Dependencies. This helps track how Power BI is fetching and transforming the data.
Kindly refer to the below document’s links for more information:
Web.Contents - PowerQuery M | Microsoft Learn
Kusto Query Language (KQL) overview - Kusto | Microsoft Learn
Power BI does not store a dataset from Application Insights. it retrieves data dynamically via APIs. To locate the dataset, you need to extract the API query used in Power BI and execute it in Azure Application Insights (Kusto Logs). Using the "Transform Data" (Power Query) and "Advanced Editor," you can find out exactly which data is being fetched.
I hope this could resolve your issue, if you need any further assistance, feel free to reach out. If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Thank you for your response. I opened the semantic model in Power BI Desktop, clicked on 'Transform Data,' and selected a dataset from the semantic model.
Then, I opened the Power Query Editor, but there are no queries available to modify the dataset or retrieve a query.
I also tried to get a query using Postman.
Do you have any advice on how to find the query?
- v-kpoloju-msft1 year ago
Community Support
Hi MarynaBan,
I apologize for any inconvenience caused. After reviewing the details you provided, I have outlined the following steps. Please follow the steps below:
Using a semantic model in Power BI, direct access to the original Power Query queries may not be available. However, there are still alternative methods to retrieve the API query.
Power BI logs API calls in the background, and the Performance Analyzer tool can capture these requests. To use it, open Power BI Desktop and navigate to View → Performance Analyzer. Click Start Recording and refresh the report. Look for queries under Direct Query or Query Diagnostics, then expand the query to find a URL. This method allows you to capture the exact API query sent to Application Insights.
Use Performance Analyzer to examine report element performance in Power BI Desktop - Power BI | Microsoft Learn
If your model is in Direct Query mode, DAX Studio can be utilized to trace the queries sent by Power BI. To do this, open DAX Studio and connect it to your Power BI model. Enable "All Queries" in the Tracing section, then refresh the report in Power BI. Look for queries that reference Web.Contents or API URLs. This method is particularly useful when Power BI uses Direct Query to fetch data dynamically.
Direct Query model guidance in Power BI Desktop - Power BI | Microsoft Learn
Direct Query in Power BI - Power BI | Microsoft Learn
If the report is published to the Power BI Service, you can check the dataset settings. Go to Power BI Service. Navigate to Datasets. Click Settings on the dataset linked to the semantic model. Look for Data source credentials → This may provide API details. If credentials reference an API key, it indicates the dataset is pulling from Application Insights.If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.- MarynaBan1 year agoFrequent Visitor
Thank you for your response. I tried using the Performance Analyzer, but it appears empty.
I export data:
{"version":"1.1.0",
"events":[{
"name":"User Action",
"component":"Report Canvas",
"start":"2025-03-27T10:04:26.601Z",
"id":"73e465ac090019e4780c",
"metrics":{"sourceLabel":"UserAction_StartedMonitoring"}},
{"name":"User Action",
"component":"Report Canvas",
"start":"2025-03-27T10:04:28.432Z",
"id":"52c8a3b47dea01e86b50",
"metrics":{"sourceLabel":"UserAction_Refresh"}}],
"sessionId":"54cdf304-e3c5-481d-acf2-ca3457fe4349"}I found out that Storage model is DirectQuery.
It means that you won’t find transformation queries in Power Query Editor.
Yes, report is published to the Power BI Service. credentials reference an API key and the dataset is pulling from Application Insights. I can fine right Application Insights by API key. But there is no relevant table or query
Do you have any advice on how to find the query?
- v-kpoloju-msft1 year ago
Community Support
Hi MarynaBan,
Apologies for the late reply. After reviewing the details you provided, I have identified few workarounds that may help resolve the issue. Please follow these steps:
There is no direct built-in feature in Power BI Service to capture API calls, but you can use the following workarounds to track API requests being sent from Power BI:
As your Power BI model operates in Direct Query mode, you can utilize DAX Studio to capture the executed queries. Using DAX Studio open the application and connect it to your Power BI model. Then, enable query tracing by navigating to the Advanced tab and selecting Enable All Queries under the Tracing section. After enabling this setting, refresh your Power BI report.
SQL Profiler can be utilized to monitor Direct Query activity in Power BI. To start, install SQL Profiler from SQL Server Management Studio. Then, connect to Power BI Desktop's local instance by opening DAX Studio, going to the Advanced tab, and copying the Localhost connection string. Open SQL Server Profiler and connect to this instance. Initiate a new trace and refresh the Power BI report to capture Direct Query requests, enabling effective monitoring of API calls.
SQL Server Profiler - SQL Server Profiler | Microsoft Learn
Since the report is published to Power BI Service, you can review the dataset logs to analyse API activity. Navigate to Power BI Service and select the relevant dataset. Then, go to Settings and check the Data source credentials section for any available API details. If the API details are not visible, you can try extracting logs by accessing the Workspace, clicking on Dataset Refresh History, and reviewing any failed refresh attempts. These failures may provide insights into API call details.
Capture API requests directly from Power BI using Fiddler or browser dev tools. Install Fiddler Classic, then open Fiddler and start capturing network traffic. Open Power BI Desktop and refresh the report. Look for requests to api.applicationinsights.io. Extract the exact API query used. Using Browser Dev Tools for Power BI Service: Open your Power BI Report in a browser. Press F12 to open Developer Tools. Go to the Network tab → Filter for applicationinsights.io. Refresh the report and look for the full API request.If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.