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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dynamic Management View (DMV) queries against PowerBI model. How to automate load into DB?

Hi 
I have been using SQL Server Management Studio to manually execute DMVs to query XMLA endpoints in our PowerBI Premium workspaces. These queries return useful information on the underlying PBI SSAS database such as:

  • M expressions in the model
  • Tables in the model
  • Relationships between the tables
  • Measures & DAX
  • Calculated columns

I would like to programtically extract the above information from all our PowerBI Premium workspaces and load it into a central database (probably SQL Azure DB) for further analysis. However,  I am struggling to find relevant information (and examples) on the more complex querying capabilities of DMVs, and scheduling DMVs. Can anyone provide any insight (or links) as to whether:

 

Any advice, during this early planning stage would be welcome

Cheers
Steve

4 REPLIES 4
tackytechtom
Super User
Super User

Hi guys,

 

Though late to the party, I'd like to share two blog posts that might be of help for others.

 

If you'd like to analyse the model with Power BI, why not directly connecting Power BI with the meta data of the dataset? This post shows a way to do this:

https://www.tackytech.blog/how-to-build-meta-reports-on-top-of-power-bi-datasets-with-dynamic-manage...

 

If you really want to save the data from the DMVs into a database (i.e. Azure SQL Database), you can look into the following one, too. The blog post uses Azure Data Factory, but you could use any other tool really. It utilises the "executeQueries" Power BI API in a copy activity (source: executeQueries API, target: Azure SQL Database). Interesting enough you can not only query the meta data (via DMVs) from the dataset but also the actual tables.

https://www.tackytech.blog/how-to-query-and-copy-data-from-power-bi-datasets-via-azure-data-factory/

 

Hope this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

vanessafvg
Super User
Super User

https://www.fourmoo.com/2021/11/24/how-did-i-keep-my-power-bi-dataset-measures-documented-and-up-to-...





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




amitchandak
Super User
Super User

@Anonymous , Have you explored this option

https://azure.microsoft.com/en-in/blog/connecting-power-bi-to-an-azure-analysis-services-server/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak Thanks for your suggestion. 

We aren't in a position to change our Enterprise Architecture. So this isn't an option.

Thanks again

Steve

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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