cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Dynamic Management View (DMV) query (M_EXPRESSIONS) result doesn't appear to be correct. Why?

I am running DMVs against datsets in our Premium PowerBI Service. I was interested in analysing and documenting the M-Code behind the PowerQuery queries so I ran the following query in SSMS. This connected to a dataset called "Timesheet" behind a PowerBI file of the same name.

Select *FROM $System.DISCOVER_M_expressions

I get a single row result back  called "Agile CC" (see below). 

DMV.PNG

I assumed this result meant there is only one M-Query (M-Expression) - called "Agile CC" in this dataset behind my "Timesheet" PowerBI report. However, when I download the PowerBI file, it is clear there are many queries (25 based on the view below) in the report/dataset. For each of these queries I can see M-Code behind them (for example the "EDW Calendar WorkDate query" see below) , that isn't returned or visible from the results of the"DISCOVER_M_EXPRESSIONS" query. 

 

Can someone explain why I see more M-Code  in the  PowerBI file, than I can from the M_EXPRESSIONS query?

Thanks in Advance

 

Steve

 

QueryWindow.PNG

 

example of query visible in the advanced editor of the PBI file, but not in the results of the DMV

EDW.PNG

Articles I have reviewed  trying to understand this. 

@https://blog.crossjoin.co.uk/2019/05/08/extract-m-code-dmv/

@https://medium.com/@martijnlentink/automate-your-power-bi-documentation-33951525c381

 

 

4 REPLIES 4
DiscreetRaven
Frequent Visitor

I'm seeing no data returned from this DMV. Nothing.

amitchandak
Super User IV
Super User IV

@Anonymous , I can see error, and it is asking for edit credentials. can check that

 

refer how to handle error in power query
https://www.youtube.com/watch?v=OE6DPmKqN7s
https://www.youtube.com/watch?v=9-Lag0VOiTs

debug issue
https://www.youtube.com/watch?v=OE6DPmKqN7s



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Anonymous
Not applicable

@amitchandak I have double checked this (by replicating the issue on a new PBI dataset in premium workspace), and it turns out  credentials are not the problem. 


Regards Steve

Did you ever resolve this issue?  I am seeing the same behavior. 

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.