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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
s0m0ffc
Regular Visitor

Alternative for DAX query

I am building an application to show the KPIs related to a powerbi dataset. This uses DAX query and runs the executeQueries to retrieve the KPIs. Here there is a dependency like if the measures of the model changes, the dax query also needs to be changed. Is there an API available to check the measures of model or is there a way where we can pull the KPI details directly from the model ? 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @s0m0ffc - You can use the Power BI REST API, Tabular Object Model (TOM) API, or XMLA Endpoint to dynamically retrieve and track the measures and KPIs from a Power BI dataset, allowing you to adjust your application based on changes in the data model. These APIs will help you avoid manually updating DAX queries by automatically reflecting changes in the measures.

ref:

Semantic model connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft...

Tabular Object Model (TOM) | Microsoft Learn

Push Datasets - Datasets GetTables - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Hope this information helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
s0m0ffc
Regular Visitor

Hi @rajendraongole1 , Thanks much for the solution! I will try implementing this.
This Push Datasets - Datasets GetTables - REST API (Power BI Power BI REST APIs) | Microsoft Learn may not work as the datasets are not push datasets. Tabular Object Model (TOM) | Microsoft Learn should probably help resolve the issue. So does that mean I need not have Dax queries written to pull KPIs ?

rajendraongole1
Super User
Super User

Hi @s0m0ffc - You can use the Power BI REST API, Tabular Object Model (TOM) API, or XMLA Endpoint to dynamically retrieve and track the measures and KPIs from a Power BI dataset, allowing you to adjust your application based on changes in the data model. These APIs will help you avoid manually updating DAX queries by automatically reflecting changes in the measures.

ref:

Semantic model connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft...

Tabular Object Model (TOM) | Microsoft Learn

Push Datasets - Datasets GetTables - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Hope this information helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.