none
Treat one power query table as source for another RRS feed

  • Question

  • Hi,

    I have a Power Query Table named as Final Table - this table has inturn been loaded to the Data Model.  I would like to use this Table (Final Table) as a source for creating another Power Query Table (I want to perform further actions on the Final Table to create yet another Table).  So I just want to know what I should specify in the Source (the first line after the Let statement) in the Advanced Editor.

    I do not see any option in the Power Query Ribbon to create an existing Power Query Table as a source.

    Thank you.


    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    Friday, February 13, 2015 3:46 AM

Answers

  • You can also achieve the same thing from the user interface with the "reference" command.

    • Marked as answer by Ashish Mathur Friday, February 13, 2015 10:42 PM
    Friday, February 13, 2015 8:16 AM
  • You can just use the query name in your new expression. Since it has a space, write #"Final Table" whenever you refer to it.

    (Note that you probably don't need to load this table to the Data Model, but only the one which includes all your transformations. To unload the first table, open Workbook Queries pane select Final Table and after right click, select "Load To". In the Load To dialog uncheck the Load to Data Model option).

    Example:

    let source=#"Final Table" in source

    • Edited by Gil RavivMVP Friday, February 13, 2015 4:58 AM
    • Proposed as answer by Gil RavivMVP Friday, February 13, 2015 5:39 AM
    • Marked as answer by Ashish Mathur Friday, February 13, 2015 10:42 PM
    Friday, February 13, 2015 4:51 AM

All replies

  • You can just use the query name in your new expression. Since it has a space, write #"Final Table" whenever you refer to it.

    (Note that you probably don't need to load this table to the Data Model, but only the one which includes all your transformations. To unload the first table, open Workbook Queries pane select Final Table and after right click, select "Load To". In the Load To dialog uncheck the Load to Data Model option).

    Example:

    let source=#"Final Table" in source

    • Edited by Gil RavivMVP Friday, February 13, 2015 4:58 AM
    • Proposed as answer by Gil RavivMVP Friday, February 13, 2015 5:39 AM
    • Marked as answer by Ashish Mathur Friday, February 13, 2015 10:42 PM
    Friday, February 13, 2015 4:51 AM
  • You can also achieve the same thing from the user interface with the "reference" command.

    • Marked as answer by Ashish Mathur Friday, February 13, 2015 10:42 PM
    Friday, February 13, 2015 8:16 AM
  • Thank you for your prompt reply.

    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    Friday, February 13, 2015 10:42 PM
  • Thank you.

    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    Friday, February 13, 2015 10:42 PM
  • Thank you! Exactly what I needed. I wanted to do additional and different transformations.
    • Edited by DilipSam Wednesday, January 8, 2020 6:37 PM
    Wednesday, January 8, 2020 6:35 PM
  • Thanks. I studied this, and researched further on how to refenece a query result.

    Finally,  I created a short video of how to reference the query results of a query in another query, using the Reference Query option within Power Query

    https://www.intellisoft.com.sg/reference-query-results-powerquery-tutorial.html

    See if some users can find it useful...

    Thanks,Vinai


    Thursday, January 9, 2020 9:06 AM