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,
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
Solved! Go to Solution.
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 @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 @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!
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.
User | Count |
---|---|
84 | |
77 | |
75 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
45 | |
43 |