+ Reply to Thread
Results 1 to 3 of 3

Aggregation at different level

  1. #1
    Registered User
    Join Date
    03-14-2016
    Location
    Pittsburgh
    MS-Off Ver
    MSOffice 2010
    Posts
    1

    Aggregation at different level

    Hi Guys, I am new to this forum, and not very good in Excel Functions.

    I have a requirement where i have to show Aggregation of data at different levels. Following data i attached.

    Region State County Revenue
    North Montana Madison $10,000
    North Minnesota Pine $20,000
    North Minnesota Benton $25,000
    South Texas Collin $50,000
    South Texas Smith $40,000
    South Alabama Blount $15,000
    East New York Clinton $60,000
    East New Jersey Essex $40,000
    East New Jersey Camden $35,000
    West California Fresno $55,000
    West California Imperial $50,000
    West Oregon Wasco $30,000

    - i have to show only Region with Revenue,and this is without Pivoting in the excel, because i will be taking this data and making as an input to another.
    Region Revenue
    North $55,000
    South $105,000
    East $135,000
    West $135,000

    - Same thing with one more column, with lower granularity

    Region State Revenue
    North Montana $30,000
    North Minnesota $25,000
    South Texas $90,000
    South Alabama $15,000
    East New York $60,000
    East New Jersey $75,000
    West California $105,000
    West Oregon $30,000

    If we can capture these scenario at the source data, that's great, or if we have to map it to another place, we can do that as well. But in any case it has be derived using functions.

    Thanks so much.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Aggregation at different level

    What is the issue with using a pivot table?

    Also, are the reports "fixed" meaning that you have region level and state level? And are the regions, states and counties fixed meaning that only the dollar amounts change for them?

    If the reports are relatively "hard coded" (the regions and states don't change a lot) then you can use SUMIFS as shown in the attached file. The attached file uses Excel tables and SUMIFS which are not available in *.xls files. You have Excel 2010, so you have tables and SUMIFS.

    What I recommend is using this file. Clear out the table data (highlight rows and right click and select Delete -> Table Rows) and copy and paste the raw data in.

    Here is more information on Excel Tables: http://www.utteraccess.com/wiki/inde...ables_in_Excel.

    How do you get your source data? It may be possible to read the source data directly into the Excel table and skip the copy / paste step.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    08-25-2015
    Location
    Near Pittsburgh, PA
    MS-Off Ver
    Excel 2013
    Posts
    152

    Re: Aggregation at different level

    Quote Originally Posted by dflak View Post
    What is the issue with using a pivot table?

    Also, are the reports "fixed" meaning that you have region level and state level? And are the regions, states and counties fixed meaning that only the dollar amounts change for them?

    If the reports are relatively "hard coded" (the regions and states don't change a lot) then you can use SUMIFS as shown in the attached file. The attached file uses Excel tables and SUMIFS which are not available in *.xls files. You have Excel 2010, so you have tables and SUMIFS.

    What I recommend is using this file. Clear out the table data (highlight rows and right click and select Delete -> Table Rows) and copy and paste the raw data in.

    Here is more information on Excel Tables: http://www.utteraccess.com/wiki/inde...ables_in_Excel.

    How do you get your source data? It may be possible to read the source data directly into the Excel table and skip the copy / paste step.
    DFLAK has given a *great* answer for you. I'd just add a couple small changes to verify the fixed/hard-coded regions - use some TOTALS. I'd add a cell to calculate the total for Col D (Grand Total), and a total for each of the smaller tables (SubTotals). Use another cell to subtract one of the subtotals from the grand total to ensure a new/different region was not inadvertently or intentionally added to the table but were not included in either subtotal.

    For this reason, I'd highly recommend a PIVOT TABLE to gather your info, as a Pivot Table will automatically add all regions.

    FYI - the data from a Pivot Table can be copied, then PASTE-SPECIAL VALUES to another place if you absolutely need the info elsewhere.

    Hope this helps!

+ 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. Posisible to Disable Save As at Program level (not workbook level)??
    By brian6464 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2014, 02:49 PM
  2. Bill of Materials conversion from multi level to single level
    By susmitpatel in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-11-2013, 12:53 AM
  3. Can't get VBA code to do task at worksheet level not workbook level
    By lealea1982 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2011, 10:22 AM
  4. conditional aggregation
    By drainedbrain in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-16-2011, 08:36 PM
  5. conditional aggregation
    By noexcel=badwork in forum Excel General
    Replies: 5
    Last Post: 02-06-2011, 08:26 AM
  6. summing, aggregation
    By shan2207 in forum Excel General
    Replies: 1
    Last Post: 11-24-2010, 08:24 AM
  7. [SOLVED] pie charts with aggregation
    By [email protected] in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-16-2006, 07:00 AM
  8. Using macro to convert single level BOM to Multi Level BOM
    By andrew_chong in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2006, 04:57 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