+ Reply to Thread
Results 1 to 6 of 6

Same Power Query on different Sheets and need a total from same tables for the work book

  1. #1
    Registered User
    Join Date
    05-14-2012
    Location
    manchester, england
    MS-Off Ver
    Excel 2016
    Posts
    10

    Same Power Query on different Sheets and need a total from same tables for the work book

    Hi you all very clever excel people.

    I consider myself average to above average at excel, but this has me stumped.

    I am a football (soccer) referee and i recently tried to collate all my data in a excel workbook. Each season is a new worksheet and all the worksheets have the same formulas and tables and power query's.

    As you can see I have 5 tables which each have there own power query, per sheet, so that 30+ queries (as each sheet has 5 queries)?

    Is there a way where i can have only 5 power queries for different data on different sheets and for it to be dynamic. So basically I only have 5 power queries instead of the 30+ i have now.
    Also is there a way where I can add up all these tables in a "career worksheet" with all data extracted from each table and into their own relevant table as a complete total, and this to be dynamic. As each new season will require a fresh new worksheet.

    My tables are in columns CN2 onwards and power queries are Z&AA, AC&AD, AF,AG&AH, AJ,AK,AL.

    Also its worth noted I'm running excel2016 version so do not have the ability on the newer functions like UNIQUE etc

    I've tried to load the whole workbook but its over the requirements of 1000kb that this site allows, so i've posted an example page so you can get the jist, but without the power query, if you need the whole book let me know.

    Any help would be greatly apricated.

    Thanks for taking a look
    Attached Files Attached Files
    Last edited by Tronulas; 07-07-2023 at 01:28 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Same Power Query on different Sheets and need a total from same tables for the work bo

    Are you still using Excel 2003? If not, please update your profile!
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  3. #3
    Registered User
    Join Date
    05-14-2012
    Location
    manchester, england
    MS-Off Ver
    Excel 2016
    Posts
    10

    Re: Same Power Query on different Sheets and need a total from same tables for the work bo

    I've just amended now, i thought I changed it ages ago.

    Thanks for the prompt.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,085

    Re: Same Power Query on different Sheets and need a total from same tables for the work bo

    Here are two possibilities:
    On the Table2 sheet are regular pivot tables produced from the green/white table which itself is produced from the following power query code:
    Please Login or Register  to view this content.
    Note that the Win column was added later using: =AND(AGGREGATE(14,6,[Score]/([Date]=[@Date]),1)<>AGGREGATE(14,6,[Score]/([Date]=[@Date]),2),AGGREGATE(14,6,[Score]/([Date]=[@Date]),1)=[@Score])

    A second option would be to load the green/white table into the data model, add measures that would do the calculations done using the getpivotdata function on the Table2 sheet, and produce power pivot tables.
    Note that in either case the pivot tables may be filtered using the Year slicer.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    05-14-2012
    Location
    manchester, england
    MS-Off Ver
    Excel 2016
    Posts
    10

    Re: Same Power Query on different Sheets and need a total from same tables for the work bo

    This works enough for me to use.

    Thank you very much.

    im going to use the 2nd option as at the present I dont understand AGGREATE. But i will teach myself today.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,085

    Re: Same Power Query on different Sheets and need a total from same tables for the work bo

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. [SOLVED] Power Query: Appending Tables
    By andrewc in forum Excel General
    Replies: 4
    Last Post: 08-26-2021, 09:48 AM
  2. Power Query: Updating a query based on changing tables
    By cheesehead101 in forum Excel General
    Replies: 1
    Last Post: 12-16-2019, 06:54 PM
  3. Power Query tables in VBA
    By orhanceliloglu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2018, 08:25 AM
  4. [SOLVED] Changing to tables so my 2007 work book will work in 2010.
    By ghammond2009 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-20-2015, 08:48 PM
  5. Power Query - how to append tables
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2015, 04:55 AM
  6. Create PDF files from multiple work sheets in a single work book
    By erprasannaa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2012, 03:42 AM
  7. Extract data into a master work book by accessing various input work sheets/workbooks
    By kammariarun in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-08-2011, 05: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