Accessing a Data Model from a Power Query script? RRS feed

  • Question

  • Is it possible to access data that is only loaded in a Data Model. I have a query (Query1) that accesses data from a SQL database. The query is to large to load to a worksheet table so I only load the data to a Data Model. I then would like to create at least 3 queries that operates on this original data 

    Using: Source = Excel.CurrentWorkbook(){[Name="table"]}[Content]

    only lets me access worksheet tables, no Data Models

    Using: Source = Query1

    will re-query the SQL database, and since I have at least 3 queries that operates in the first query (Query1), that will be time consuming

    • Edited by erapade Friday, May 6, 2016 10:09 PM
    Friday, May 6, 2016 10:08 PM


  • Hi erapade. There's currently no way to access the Data Model from Power Query. Your best bet would be to reference the original query and do the additional transformations against that.

    If you don't need the entire raw source table loaded to the Data Model, you can disable load for Query1 and only load the queries that depend on Query1.


    • Marked as answer by erapade Wednesday, May 11, 2016 7:08 PM
    Monday, May 9, 2016 6:44 PM