Forum Discussion

LoremIpsum's avatar
LoremIpsum
Regular Visitor
8 years ago
Solved

Understanding Get Data > Folder Resulting Queries

When importing data from multiple Excel files within a folder I end up with many queries, and I'm wanting to understand them. I have 3 reasons for my curiosity: first I like to learn, second I like my projects to be organized (I can't organize and rename all of the resulting queries), and third I want to know if there is a more streamlined approach (when recording macros in Excel the result works, but there is almost always superfluous code).

 

Everything can be renamed more descriptive names except for the "Other Queries [1]" folder.

 

Thank you.

  • Anonymous's avatar
    Anonymous
    8 years ago

    In your edit queries section, think of each "Query" as a single data source or table.  The folders are simply how you wish to organise those queries.

     

    You can extend the queries such that you merge in data from other queries.  You can write your own queries that take data from existing queries.

     

    If you import a folder of files, or you import an excel file of multiple tabs, you can end up with multiple queries.  This will be because you will be building multiple tables of data, each which need to be considered in singular.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Unlike the 'record macros' in excel and VBA, the Power Query code written by the editor is pretty great.  It works 100% in my experience, even if you get in and hand code elements yourself.

     

    In my projects, i make use of Query Folders to group together my data sources and tables into meaningful folders.  This helps me when i come back an trouble shoot later on.  Similar to the point you have raised, renaming the steps and the folder into intrinsic meaningful names is a good practise.

    • LoremIpsum's avatar
      LoremIpsum
      Regular Visitor

      But this isn't possible when setting up an import from a folder. You get many files and folders. Most of these you can rename; however, I need to better understand what they are doing before I go renaming them. Some you can't rename though.

      • Anonymous's avatar
        Anonymous
        Not applicable

        In your edit queries section, think of each "Query" as a single data source or table.  The folders are simply how you wish to organise those queries.

         

        You can extend the queries such that you merge in data from other queries.  You can write your own queries that take data from existing queries.

         

        If you import a folder of files, or you import an excel file of multiple tabs, you can end up with multiple queries.  This will be because you will be building multiple tables of data, each which need to be considered in singular.