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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
PowerRon
Post Patron
Post Patron

How to find where a view is used in Power BI datasets?

Hi,

we have a lot of Power BI datasets.
Now a view, that is input for a number of these Power BI datasets, is changed.
What is a quick and easy way to find out in which datasets this view/query is used?

We have SQLServer, so I can use Analysis Services if necessary.

Regards
Ron

1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hi @PowerRon ,
Yes, you can check where queries containing specific keywords like %Customer% are used across multiple Power BI datasets using TMSL, MDX, or DMVs (Dynamic Management Views) in SQL Server Analysis Services (SSAS) or Power BI Premium XMLA endpoints. The most efficient way to search for references to Customer in datasets is by querying the M expressions (Power Query transformations) or dataset schema. If you're using Analysis Services or Power BI Premium, you can execute the following DMV query to search for any occurrences of Customer in dataset expressions:

SELECT * 
FROM $System.DISCOVER_M_EXPRESSIONS
WHERE EXPRESSION LIKE '%Customer%'

Alternatively, if you want to check column definitions, you can run: 

SELECT * 
FROM $System.TMSCHEMA_COLUMNS
WHERE EXPRESSION LIKE '%Customer%'

For Power BI Premium users, you can use the XMLA endpoint to connect via SQL Server Management Studio (SSMS) and execute the above queries to identify datasets using the keyword Customer. If you're dealing with multiple Power BI datasets stored in PBIX files, you can also extract the Power Query M code by opening each file, navigating to Transform Data → Advanced Editor, and searching for Customer. Additionally, for Power BI Service (Pro or Premium), you can utilize the Power BI REST API to fetch dataset metadata and search for the query references dynamically. This approach helps ensure that you can track all dataset dependencies efficiently and update them as needed.

 

 

Passionate about leveraging data analytics to drive strategic decision-making and foster business growth.
Connect with me on LinkedIn.

View solution in original post

7 REPLIES 7
PowerRon
Post Patron
Post Patron

OK @lbendlin thnx. DMV is new for me, have to dive into it

rohit1991
Super User
Super User

Hi @PowerRon ,
Yes, you can check where queries containing specific keywords like %Customer% are used across multiple Power BI datasets using TMSL, MDX, or DMVs (Dynamic Management Views) in SQL Server Analysis Services (SSAS) or Power BI Premium XMLA endpoints. The most efficient way to search for references to Customer in datasets is by querying the M expressions (Power Query transformations) or dataset schema. If you're using Analysis Services or Power BI Premium, you can execute the following DMV query to search for any occurrences of Customer in dataset expressions:

SELECT * 
FROM $System.DISCOVER_M_EXPRESSIONS
WHERE EXPRESSION LIKE '%Customer%'

Alternatively, if you want to check column definitions, you can run: 

SELECT * 
FROM $System.TMSCHEMA_COLUMNS
WHERE EXPRESSION LIKE '%Customer%'

For Power BI Premium users, you can use the XMLA endpoint to connect via SQL Server Management Studio (SSMS) and execute the above queries to identify datasets using the keyword Customer. If you're dealing with multiple Power BI datasets stored in PBIX files, you can also extract the Power Query M code by opening each file, navigating to Transform Data → Advanced Editor, and searching for Customer. Additionally, for Power BI Service (Pro or Premium), you can utilize the Power BI REST API to fetch dataset metadata and search for the query references dynamically. This approach helps ensure that you can track all dataset dependencies efficiently and update them as needed.

 

 

Passionate about leveraging data analytics to drive strategic decision-making and foster business growth.
Connect with me on LinkedIn.

Hi @rohit1991  let me try this out and come back to you.

Anonymous
Not applicable

Hi @PowerRon  ,
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered? If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!

lbendlin
Super User
Super User

 

What is a quick and easy way

 

Hahaha, good one.

 

Use Purview, the tenant audit logs, or the DMVs for Partitions and Expressions to harvest all the queries that MIGHT depend on your view. (Power BI doesn't know or care that it is a view - for Power BI it is a tabular query source)

 

 

 is used

 

That is a whole 'nother can of worms. The Tenant Audit logs only go down to report usage, not visual usage. Even with Azure Log Analytics enabled I don't think you get to that level of detail.

Thnx @lbendlin 
Let me put it in other words.
Is there a possibiliy to check where queries like '%Customer%' are used in a bunch of Power BI datasets?
Using TMSL or MDX or ....

You use DMVs for that, Partitions and Expressions from TMSchema. You have to run these against every Semantic Model.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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