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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
BM4291
Resolver I
Resolver I

Get source queries from PowerPivot/1103 Compatibility Mode

Hi,

 

A little bit of cross-posting but not getting much traction on StackOverflow, and hoping someone here might provide some clarity: excel - VBA - ModelTable get all SQL queries - Stack Overflow

As in the above link, I am looking to document our legacy Excel workbooks; we have about 50 over the estate which are connected to our SQL database via PowerPivot.

 

I'm able to extract the measures quite easily through the Model object and DMVs but still unable to get the source queries of the tables; each file contains one or two connections, with multiple tables attached. I'm open to any method that will help us extract this information.

 

Any help greatly appreciated!

4 REPLIES 4
lbendlin
Super User
Super User

select * from $SYSTEM.TMSCHEMA_PARTITIONS

select * from $SYSTEM.TMSCHEMA_EXPRESSIONS

@lbendlin unfortunately the TMSCHEMA_* DMVs aren't accessible in a 1103 compatibility mode model so those queries aren't an option in this instance. For whatever reason, that looks to be the latest compatibility mode available via PowerPivot in Excel.

 

Any suggestions for 1103? I've tried to run a DISCOVER_XML_METADATA query but unable to get the XMLA connection to open correctly when pointing at the local model.

 

PowerPivot Compatibility across versions - SQLBI

No idea - is the compatibility level higher in newer Excel versions?

@lbendlin doesn't look that way, the last thing I can see documenting which compatibility mode goes with which version is the SQLBI article above; anything > Excel 2013 is 1103.

 

We're using the M365 version so fairly recent.

 

BM4291_0-1671002095940.png
I saw something about the level being higher in PowerQuery but we've not got the time or desire to make that switch just to extract the queries before ultimately dumping these workbooks.

 

We've recently had an issue with a high priority measure being shared incorrectly so this is really an exercise in damage control and to strengthen the business case.

 

We have accesss to Gartner through work so likely going to take it to their technical analysts, seems to be the only option as just losing time on this one daily.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.