Forum Discussion
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 ?
Hi Anonymous - 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:
Tabular Object Model (TOM) | Microsoft Learn
Push Datasets - Datasets GetTables - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Hope this information helps.
2 Replies
- rajendraongole1Super User
Hi Anonymous - 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:
Tabular Object Model (TOM) | Microsoft Learn
Push Datasets - Datasets GetTables - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Hope this information helps.
- AnonymousNot applicable
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 ?