Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Everyone,
I'm currently working on Automating a process where I need to read KPI values from a Power BI report preferably using the Power BI Rest API. I wanted to check if this is possible, and if so, what are the steps required to set it up.
Specifically, I am looking to:
1. Access the KPI visuals from a published Power BI report.
2. Read or extract the current visuals programmatically.
I've seen the REST API documentation, but its not clear whether it supports reading visual-level data like KPIs. If anyone has experience with this or can point me to right approach, I'd really appreciate it.
Thanks in advance!
Solved! Go to Solution.
Hi. The way to go here would be query the dataset with dax. First, understando how to get that value. You can open the Performance Analyzer, run it, open the kpi visual and copy query. That will copy to clipboard a DAX query that returns the number of the KPI. You can use it for the request to keep the context you are seeing. You can also create the DAX query if you know what you want.
Once you have the DAX that would return that data, you can use this request of the rest api: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries-in-group
If this is the first time using Power Bi Rest API check this out: https://blog.ladataweb.com.ar/post/740398550344728576/seteo-powerbi-rest-api-por-primera-vez
I hope that helps,
Happy to help!
Hi @SourabhW ,
Thanks for your question.
As mentioned by @ibarrau , the Power BI REST API does not provide direct access to visuals like KPIs. However, you can retrieve the data behind the KPI by using the ExecuteQueries REST API with a DAX query.
To do this:
Open your report in Power BI Desktop.
Enable Performance Analyzer (View > Performance Analyzer), start recording, and interact with the KPI visual.
Use Copy Query to get the DAX query used by the KPI.
Use the Execute Queries in Group API to run this DAX query and retrieve the data programmatically.
If you're setting up the API for the first time, the blog post shared by Ibarrau is a helpful reference.
Additionally you can refer to: Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn
Hope this helps. Please reach out for further assistance.
Please consider marking the helpful reply as Accepted Solution to assist others with similar issues and a kudos would be appreciated.
Thank you.
HI @SourabhW ,
We’re following up once more regarding your query. If it has been resolved, please mark the helpful reply as the Accepted Solution to assist others facing similar challenges.
If you still need assistance, please let us know.
Thank you.
Hi @SourabhW ,
Following up to see if your query has been resolved. If any of the responses helped, please consider marking the relevant reply as the 'Accepted Solution' to assist others with similar questions.
If you're still facing issues, feel free to reach out.
Thank you.
Hi @SourabhW ,
Just checking in to see if you query is resolved and if any responses were helpful. If so, kindly consider marking the helpful reply as 'Accepted Solution' to help others with similar queries.
Otherwise, feel free to reach out for further assistance.
Thank you.
Hi @SourabhW ,
Thanks for your question.
As mentioned by @ibarrau , the Power BI REST API does not provide direct access to visuals like KPIs. However, you can retrieve the data behind the KPI by using the ExecuteQueries REST API with a DAX query.
To do this:
Open your report in Power BI Desktop.
Enable Performance Analyzer (View > Performance Analyzer), start recording, and interact with the KPI visual.
Use Copy Query to get the DAX query used by the KPI.
Use the Execute Queries in Group API to run this DAX query and retrieve the data programmatically.
If you're setting up the API for the first time, the blog post shared by Ibarrau is a helpful reference.
Additionally you can refer to: Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Learn
Hope this helps. Please reach out for further assistance.
Please consider marking the helpful reply as Accepted Solution to assist others with similar issues and a kudos would be appreciated.
Thank you.
Hi. The way to go here would be query the dataset with dax. First, understando how to get that value. You can open the Performance Analyzer, run it, open the kpi visual and copy query. That will copy to clipboard a DAX query that returns the number of the KPI. You can use it for the request to keep the context you are seeing. You can also create the DAX query if you know what you want.
Once you have the DAX that would return that data, you can use this request of the rest api: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries-in-group
If this is the first time using Power Bi Rest API check this out: https://blog.ladataweb.com.ar/post/740398550344728576/seteo-powerbi-rest-api-por-primera-vez
I hope that helps,
Happy to help!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
50 | |
31 | |
26 | |
26 | |
25 |
User | Count |
---|---|
60 | |
49 | |
29 | |
24 | |
23 |