+ Reply to Thread
Results 1 to 10 of 10

more efficient consolidation formula

  1. #1
    Forum Contributor
    Join Date
    04-03-2007
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    137

    more efficient consolidation formula

    Hi,
    Hoping for some guidance on a more efficient way to consolidate a large table fo data.

    XL version 2007 Sp2.

    real world data range is over 35,000 rows and 138 columns.
    unfortunately re-organising the data is not really an option.

    I've been using sumproduct (see attached) which takes a very long time to calculate (more than 1 hour).

    Rather than me blathering on it'd be easier to look at the attached.

    Apologies for thefiles size, (tredding the fine line between too much data and too little)


    Any insights much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-03-2007
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    137

    Re: more efficient consolidation formula

    Hi Stormseed,
    Thanks for the info.
    Yeah, lucky to have XL07 (though sometimes I'm not sure).

    I tried VBA to recreate what I'm doing with the SUMPRODUCT formula but couldn't get it to work.
    Any ideas on coding that (specific to my example file) would be great.

    The data is pulled from an oracle db via object oriented sql query builder - unfortunately the row 'visit location' names and column 'visit location' names are the same dimension/datapoint, so the app naturally tries to coecre synchronisation of the dimensions (even when pivoting) hence trying to solve it in trusty Excel.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: more efficient consolidation formula

    perhaps...

    Please Login or Register  to view this content.
    less elegant, more efficient.

  4. #4
    Forum Contributor
    Join Date
    04-03-2007
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    137

    Re: more efficient consolidation formula

    Thanks DonkeyOte!

    I'll have crack at the large file in the morning (22:55 here).

    Feel I should have a witty quote from Black Adder to part with, not sure why...

    Oh well. Thanks again.

    I've never concatenated reference elements in formula so this is a good learning exercise in more ways than one - I'm guessing but I suppose this is easily adapted to Sum (I've other metrics to aggregate, spend, dwell time etc).

    Cheers!!
    Last edited by Jbentley; 08-19-2009 at 07:02 AM. Reason: horrendous spelling & grammar

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: more efficient consolidation formula

    Concatenation in conjunction with SUMIF/COUNTIF (& wildcards) is 9 times out of 10 a far more efficient method for dealing with multi conditional calculations when dealing with:

    a) large volume of calcs

    b) large volume of data

    I have illustrated this on a few threads around here in the past but can't find links presently... as and when I do I will post them here so you can see how you can use wildcards in conjunction with SUMIF/COUNTIF to make the approach pretty flexible.

    In XL2007 you do have COUNTIFS / SUMIFS which can negate need for SUMPRODUCT and concatenation based approach but in this instance they are not viable unfortunately given dimensions in use.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: more efficient consolidation formula

    I know you said your data probably can't be changed, but looking at it I have to point out that it is 10 times longer than it probably needs to be.

    All of the pertinent information is available in columns C:Q. Of the sample data, there are actually only 532 unique customer IDs. Scaling that up, maybe less than 5000 actual customers?

    If the customer ID appeared ONCE each instead over and over again and column C:Q included all the places that were visited, you would have to analyze the information differently, but it would all still be there, the same conclusions can be drawn and at a fraction of the cost.

    Scanning through the original data I do see there occasional variations where a customer ID appears more than once and the C:Q values aren't exactly the same (but they should be, yes?), but mostly each row contains the same info in each section. For instance, ID #1813307 appears 11 times and it's the same information. That means in your current design you're evaluating the same customer 11 times for no gain.

    I've attached a sheet showing a second table off to the right where the unique IDs for the sample data are listed.

    The construction of the formulas on the OutPut sheet would take a little more engineering, but based on the size of the current data layout, the new layout is worth the effort since your sheet becomes far more manageable.

    If you're willing to forgo the multiple listings of each client and just use a single data line for each, indicate so, we can help you complete the other calcs based on that much shorter data set.
    Attached Files Attached Files
    Last edited by JBeaucaire; 08-19-2009 at 07:21 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: more efficient consolidation formula

    I have illustrated this on a few threads around here in the past but can't find links presently... as and when I do I will post them here so you can see how you can use wildcards in conjunction with SUMIF/COUNTIF to make the approach pretty flexible.
    Here are a couple where the revised approach has had fairly significant impact on overall performance (without need to switch to Manual Calc (last resort IMO))

    http://www.excelforum.com/excel-gene...or-others.html

    http://www.excelforum.com/excel-gene...t-formula.html

  8. #8
    Forum Contributor
    Join Date
    04-03-2007
    Location
    Auckland, New Zealand
    MS-Off Ver
    2007
    Posts
    137

    Re: more efficient consolidation formula

    Thanks both DonkeyOte and JBeaucaire,
    Both look promising.
    I'll eventually be dealing with 60k+ customers and up to 135 visit locations for each.

    This is customer visits to casino gaming machines (machines aggregated by geographic locale) and, I hope, will help my product and customer relationship discussions.

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: more efficient consolidation formula

    There are formulas for everything, but if your data is going to grow THAT big, you absolutely must eliminate unnecessary duplication, don't you agree?

    Evaluating the same information 11 times for one customer for no gain on the small sample, that would size up to 100s and 100s of pointless calculations if the current data setup reached 60k customers.

    While you can, convert to 1 row per customer now, eliminate the unnecessary column C, then start putting together the versions of your formulas that will apply to that data format so it's done when the data starts to explode.

    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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