+ Reply to Thread
Results 1 to 14 of 14

Multiple Queries from the Same Data Set

Hybrid View

  1. #1
    Registered User
    Join Date
    12-21-2017
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    2010
    Posts
    33

    Multiple Queries from the Same Data Set

    I am new to "Get Data". I have determined I do not need a data model. I have data entry tabs and reporting tabs. Essentially, there is too much information for one 11 x 17 piece of paper. So, I am "getting data" and slicing up my data entry tab to create two separate reports I can nicely print ( Building Program and Building Occupancy ). Both query tables reference the same set of data; each have just been edited to remove particular columns. Is there any inefficiency issue to referencing the same batch of data multiple times? The query pane lists each link multiple times. Being new to query, I want to make sure there isn't a way of linking once, refreshing once, when the links are actually all to the same root worksheet.

    Thanks in advance!!!

    Three exclamations. An odd number feels right.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Multiple Queries from the Same Data Set

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    12-21-2017
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    2010
    Posts
    33

    Re: Multiple Queries from the Same Data Set

    Hi sandy666. You pointed me toward queries before. My firm was stuck in Excel 2010, however. They just upgraded. So, I am now better understanding the tool.

    "Programming Worksheets" feeds "Programming Reports". All the data is entered in the "Building Program Worksheet" tab. I want it to dynamically update in the reporting workbook for printing purposes. Currently, there is an array in place. However, if rooms are deleted or added, though the array definition updates, the cells the array is applied to do not. I lose data. For example, "Ticket Booth" disappears. I have been testing "Get Data" and I do not believe I need a data model; I am not comparing multiple charts or data, just duplicating and "cleaning" data. I simply noticed that each time I make the query, I get a separate line item. I am only referencing one set of data, but I end up with at least two "copies" of its query in the query pane. See the attached JPG. I wonder if I am losing some efficiency or I am not using the tool properly. Thanks in advance as always.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by jcordell65; 01-27-2018 at 11:55 PM.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Multiple Queries from the Same Data Set

    load Programming Worksheets as connection only
    then if you want say, Report1 make Reference from loaded connection first Query say MAIN, transform as you need and load to the sheet
    if you want Report2 create next Reference from MAIN and transform it as you wish
    etc... etc...
    After that you can change name of reference to eg. Report One, Report Two , etc...

    don't do anything with MAIN - all what you need do with References

    refer.jpg

    All your changes in source data will be reflected in your Reports

    Edit:
    Out of PowerQuery
    You've hardcoded links to data from source, it doesn't make sense to me because both (or more) workbooks work if they are open. With closed source you'll get error.
    Last edited by sandy666; 01-28-2018 at 01:13 AM.

  5. #5
    Registered User
    Join Date
    12-21-2017
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    2010
    Posts
    33

    Re: Multiple Queries from the Same Data Set

    I’m holding my six-month old; I’m not at the computer. What do you mean by hardcoded? I do work with them all open.

  6. #6
    Registered User
    Join Date
    12-21-2017
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    2010
    Posts
    33

    Re: Multiple Queries from the Same Data Set

    Oh! And thanks!!!

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Multiple Queries from the Same Data Set

    You are welcome

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
    then select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
    If you did it already - ignore it.
    Thank you.

  8. #8
    Registered User
    Join Date
    12-21-2017
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    2010
    Posts
    33

    Re: Multiple Queries from the Same Data Set

    Oops. Look one message above. I asked an additional question right before I said “thanks”

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Multiple Queries from the Same Data Set

    I was thinkin' "Oh!" = understand

    =ROUNDUP(SUMIF('path_to_the_source[Programming Worksheets.xlsx]Building Program Worksheet.'!$H$13:$H$65,'path_to_the_source[Programming ........... etc etc...

    it doesn't work with closed source workbook

  10. #10
    Registered User
    Join Date
    12-21-2017
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    2010
    Posts
    33

    Re: Multiple Queries from the Same Data Set

    Right! You are looking at the "Executive Summary". I have done quite a bit of re-work since we last spoke about dynamic updates. I reorganized all my tabs, switching which workbook they lived in. I decided on one file for data entry and one for printing. The "Executive Summary" I haven't touched yet. It has way old formula references. I have learned how to name cell ranges since then too! I never did hard-code the file locations, however. I do see the file path as you are pointing out. That appeared as I moved tabs around. I am not sure why. I had to purge and re-do all the formula out of my "Programming Worksheets" file. I am just getting back to re-doing the "Programming Reports" file.

    Someone found a formula way to do it ( search for my other recent post ). I still don't understand why the formula works, but I have it. With the formula, however, the bottom actually doesn't flex; there are just empty linked cells. I want to create new total rows at the bottom; the formula array would thus present an issue. Did you see my row height post? The total row flexes with the bottom of the query table, but its row height will not stay. I describe it more in its thread.

    Oh! = I forgot to say thanks before I got greedy about the wonderful help Hahaha.

  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Multiple Queries from the Same Data Set

    I think you should plan first what, where and how - will be loaded from the raw data (which should be as simple as possible and of coz Excel Table. No additional formatting)
    Then... you can call the raw data via PQ and format it as you wish (eg. turn on/off changing size of cells, turn on/off preserve cell formatting and some more. it's up to you)
    You can add a PQ table (Reference) to DataModel and calculate there what you want or create relationships between the tables if you will need it.
    To the PQ table in the sheet you can add Totals Row and select from there SUM, AVERAGE and some more functions...
    Of course you can Transform Reference table as you wish then load it to the sheet. (main option of PQ)
    There are many more features - you can dig out a bit (too much typing here )
    all of them you can do with single source data and that's good that you can do everything you want with one source.

    Edit:
    I forgot about PivotTable (or PowerPivot) but I think you know about this add-in

    IMHO you can format Reports only for printing, the rest leave as standard Excel Tables
    Last edited by sandy666; 01-28-2018 at 05:23 PM. Reason: see edit

  12. #12
    Registered User
    Join Date
    12-21-2017
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    2010
    Posts
    33

    Re: Multiple Queries from the Same Data Set

    Oh! Even more interesting. You can refresh when inside Power Query, not inside Excel. It's a connection. That sort of makes sense.

  13. #13
    Registered User
    Join Date
    12-21-2017
    Location
    Grand Rapids, Michigan
    MS-Off Ver
    2010
    Posts
    33

    Re: Multiple Queries from the Same Data Set

    Interesting thing happened. I liked your "connection only" idea. It took me a bit to Google how to find that setting, but I found it. I cannot refresh, however, a "connection only" query. So, the idea about clicking the master doesn't really work. I think I will probably just re-name the individual queries without the master all together.

    Am I missing something?

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Multiple Queries from the Same Data Set


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using Excel and VBA to get API/Web Data with Multiple Queries
    By cfc06 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-02-2016, 07:20 AM
  2. VBA To Create Multiple Queries When Data Varies
    By Excel4444 in forum Access Tables & Databases
    Replies: 3
    Last Post: 02-28-2016, 10:05 PM
  3. Replies: 0
    Last Post: 01-21-2013, 12:47 PM
  4. Embedded Access queries in Excel - if the database moves, how to update queries?
    By Paul_mcc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-06-2012, 07:52 PM
  5. Multiple Web Queries
    By eros18 in forum Excel General
    Replies: 2
    Last Post: 12-01-2011, 01:59 PM
  6. Production planning - retrieve, update data and multiple queries
    By swanseaexcel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-05-2011, 12:06 PM
  7. Replies: 0
    Last Post: 02-13-2006, 06:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1