MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 25th, 2002, 09:05 AM   #1
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

Does anyone know if the GETPIVOTDATA function is likely to get unreliable with a big pivot table? It seems to work all the time with small pivot tables, but I have this pivot table based on 8000*40 data cells, with 30 fields ad 5 pivoting fields and I am always having problems, returns #N/A even when the values are in the pivot table. It is a worry.

Should I perhaps not be using pivot tables for such data, and perhaps think about using DSUM or something ( I am not familiar with database functions at all by the way ).

Many thanks,

RET79
RET79 is offline   Reply With Quote
Old May 26th, 2002, 05:17 AM   #2
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

RET,

the info you require via GETPIVOTDATA that is giving you the N/A error, have you tried getting the same info via DSUM or SUMPRODUCT yet to see if you also get the same error message ?

if you can't get an answer using ither methods, then it's likely it's the data that's at fault (or the arguements you're using) rather than the size of your pivot table

just try it on a couple of entries and see what happens
__________________
:: Pharma Z - Family drugstore ::
Chris Davison is offline   Reply With Quote
Old May 26th, 2002, 07:05 AM   #3
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

Chris,

Thanks for your reply.

It has just occured to me that maybe I don't need to use pivot tables at all!

A 3 way sumif could well do the trick, for instance take a look at the pivot table I am looking at now:
Microsoft Excel - 1-4NetPremPTgen.xls______________Running: xl2000 : OS = Windows (32-bit) 4.10
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp
E6=27829721

A
B
C
D
E
1
VAL-TYPEVAL-CLASSREC-TYPEDataTotal
2
5AFPPSum of NUM1479780
3



Sum of YV<=0 NUM1121692
4



Sum of YV =0 NUM1121692
5



Sum of YV <0 NUM0
6



Sum of CURR-SUM-ASSD27829721
PivotSheet

To see the formula in the cells just click on the cells hyperlink

The above image was automatically generated by[HtmlMaker V1.25]
If you want this code, click here and Colo will email the file to you
This code was graciously allowed to be modified: by Ivan F Moala All credit to Colo


as all I need to do is sum up column NUM for each condition.

RET79

[ This Message was edited by: RET79 on 2002-05-26 06:14 ]
RET79 is offline   Reply With Quote
Old May 26th, 2002, 07:17 AM   #4
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

A 3 way sumif could well do the trick...

RET

Just curious: How would this "3 way sumif" look like?

Aladin
Aladin Akyurek is offline   Reply With Quote
Old May 26th, 2002, 07:21 AM   #5
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

Aladin,

I don't really know!

But the idea being that you sum the relevant rows in the NUM column when VAL-TYPE = 5, VAL-CLASS = A and REC-TYPE = FPP.

I am not much of an expert on this I must admit, but because I am having so many problems with the GETPIVOTDATA function I must look into a more reliable alternative.

All I am essentially doing is summing up different data based on certain conditions.

Any help appreciated,

RET79

[ This Message was edited by: RET79 on 2002-05-26 06:21 ]
RET79 is offline   Reply With Quote
Old May 26th, 2002, 07:31 AM   #6
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

Just to explain better about where I am using this GETPIVOTDATA thing, it is used in tables such as this one, based on the pivottable posted above:

Microsoft Excel - 1-4NetPremPTgen.xls______________Running: xl2000 : OS = Windows (32-bit) 4.10
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp
A1=FPP

A
B
C
D
E
F
G
1
FPP





2
A





3

5678910
4
NUM:alert('=GETPIVOTDATA(PivotSheet!A23,B$3&%22%20%22&$A$2&%22%20%22&$A$1&%22%20Sum%20of%20%22&$A4)')>1479780




5
YV<=0 NUM:alert('=GETPIVOTDATA(PivotSheet!A24,B$3&%22%20%22&$A$2&%22%20%22&$A$1&%22%20Sum%20of%20%22&$A5)')>1121692




6
YV =0 NUM:alert('=GETPIVOTDATA(PivotSheet!A25,B$3&%22%20%22&$A$2&%22%20%22&$A$1&%22%20Sum%20of%20%22&$A6)')>1121692




7
YV <0 NUM:alert('=GETPIVOTDATA(PivotSheet!A26,B$3&%22%20%22&$A$2&%22%20%22&$A$1&%22%20Sum%20of%20%22&$A7)')>0




8
CURR-SUM-ASSD:alert('=GETPIVOTDATA(PivotSheet!A27,B$3&%22%20%22&$A$2&%22%20%22&$A$1&%22%20Sum%20of%20%22&$A8)')>27829721




9
YV<=0 CURR-SUM-ASSD:alert('=GETPIVOTDATA(PivotSheet!A28,B$3&%22%20%22&$A$2&%22%20%22&$A$1&%22%20Sum%20of%20%22&$A9)')>21239563




10
YV =0 CURR-SUM-ASSD:alert('=GETPIVOTDATA(PivotSheet!A29,B$3&%22%20%22&$A$2&%22%20%22&$A$1&%22%20Sum%20of%20%22&$A10)')>21239563




11







Sheet1

To see the formula in the cells just click on the cells hyperlink

The above image was automatically generated by[HtmlMaker V1.25]
If you want this code, click here and Colo will email the file to you
This code was graciously allowed to be modified: by Ivan F Moala All credit to Colo


I think I need to get an alternative to this approach as the GETPIVOTDATA function is very unreliable, so am looking for perhaps a lookup solution.

RET79
RET79 is offline   Reply With Quote
Old May 26th, 2002, 07:39 AM   #7
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

Quote:
On 2002-05-26 06:21, RET79 wrote:
Aladin,

I don't really know!

But the idea being that you sum the relevant rows in the NUM column when VAL-TYPE = 5, VAL-CLASS = A and REC-TYPE = FPP.

I am not much of an expert on this I must admit, but because I am having so many problems with the GETPIVOTDATA function I must look into a more reliable alternative.

All I am essentially doing is summing up different data based on certain conditions.

Any help appreciated,

RET79

[ This Message was edited by: RET79 on 2002-05-26 06:21 ]
That much I suspected. That's, you'll need a function for multiconditional sum, something SUMIF cannot handle.

You have to use either a SUMPRODUCT (or an equivalent array-formula) or DSUM formula.

=SUMPRODUCT((VAL-CLASS="A")*(REC-TYPE="FPP"),(NUM))

where VAL-CLASS is the name of the range that houses the val-class values, REC-TYPE the name of the range that houses the rec-type values, NUM the name of the range that houses the num values that you want to conditionally sum and "A" plus "FPP" are conditions that must hold for the relevant ranges.

If you don't have too many pairs of conditions, you'll be OK qua performance.

DSUM is not hassle-free: you have to set up for every pair of conditions a criteria range.

Aladin
Aladin Akyurek is offline   Reply With Quote
Old May 26th, 2002, 07:54 AM   #8
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

OK Aladin, I have managed to do this problem now with array formula and GETPIVOTDATA. Now I am really interested in your sumproduct method, but if I understood you correctly, does this mean that you have to set up named ranges?

In some cases, I will require looking up data across 5 columns. Also, the underlying data may change so I would prefer to have the formulas in these table to be rigid and still work if we change to more accurate data etc.

Thanks,

RET79
RET79 is offline   Reply With Quote
Old May 26th, 2002, 08:20 AM   #9
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
Default

Quote:
On 2002-05-26 06:54, RET79 wrote:
OK Aladin, I have managed to do this problem now with array formula and GETPIVOTDATA. Now I am really interested in your sumproduct method, but if I understood you correctly, does this mean that you have to set up named ranges?

In some cases, I will require looking up data across 5 columns. Also, the underlying data may change so I would prefer to have the formulas in these table to be rigid and still work if we change to more accurate data etc.

Thanks,

RET79
If you post the array-formula you used, we can see whether that can be translated directly to a SUMPRODUCT formula, which can be slightly faster and doesn't require control+shift+enter when entering and after an edit.

The ranges do not have to be named. However, you can envisage using names or range specifiers for ranges that frequently.


[ This Message was edited by: Aladin Akyurek on 2002-05-26 07:21 ]
Aladin Akyurek is offline   Reply With Quote
Old May 26th, 2002, 08:31 AM   #10
RET79
Board Regular
 
Join Date: Mar 2002
Location: England, UK.
Posts: 526
Default

Aladin,

This is my attempt so far with array formulas, the underlying data is on a sheet called NetPrem.

These formulas currently do NOT do what I want, are picking out the first value and not totalling all the values as I would like.

Anyway I will post it for you to see.

I would most DEFINATELY prefer a SUMPRODUCT solution if possible.

Here is my attempt anyway, sorry, am having a bad excel day

Microsoft Excel - 1-4NetPremPTgen.xls______________Running: xl2000 : OS = Windows (32-bit) 4.10
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp
A1=FPP

A
B
C
D
1
FPP


2
A


3

567
4
NUM:alert('{=INDEX(NetPrem!$A$1:$BG$244,MATCH(B$3&$A$2&$A$1,NetPrem!$A$1:$A$244&NetPrem!$C$1:$C$244&NetPrem!$D$1:$D$244,0),MATCH($A4,NetPrem!1:1,0))}')>11857

5
YV<=0 NUM:alert('{=INDEX(NetPrem!$A$1:$BG$244,MATCH(B$3&$A$2&$A$1,NetPrem!$A$1:$A$244&NetPrem!$C$1:$C$244&NetPrem!$D$1:$D$244,0),MATCH($A5,NetPrem!1:1,0))}')>11857

6
YV =0 NUM:alert('{=INDEX(NetPrem!$A$1:$BG$244,MATCH(B$3&$A$2&$A$1,NetPrem!$A$1:$A$244&NetPrem!$C$1:$C$244&NetPrem!$D$1:$D$244,0),MATCH($A6,NetPrem!1:1,0))}')>11857

7
YV <0 NUM:alert('{=INDEX(NetPrem!$A$1:$BG$244,MATCH(B$3&$A$2&$A$1,NetPrem!$A$1:$A$244&NetPrem!$C$1:$C$244&NetPrem!$D$1:$D$244,0),MATCH($A7,NetPrem!1:1,0))}')>


8
CURR-SUM-ASSD:alert('{=INDEX(NetPrem!$A$1:$BG$244,MATCH(B$3&$A$2&$A$1,NetPrem!$A$1:$A$244&NetPrem!$C$1:$C$244&NetPrem!$D$1:$D$244,0),MATCH($A8,NetPrem!1:1,0))}')>367269

9
YV<=0 CURR-SUM-ASSD:alert('{=INDEX(NetPrem!$A$1:$BG$244,MATCH(B$3&$A$2&$A$1,NetPrem!$A$1:$A$244&NetPrem!$C$1:$C$244&NetPrem!$D$1:$D$244,0),MATCH($A9,NetPrem!1:1,0))}')>367269

10
YV =0 CURR-SUM-ASSD:alert('{=INDEX(NetPrem!$A$1:$BG$244,MATCH(B$3&$A$2&$A$1,NetPrem!$A$1:$A$244&NetPrem!$C$1:$C$244&NetPrem!$D$1:$D$244,0),MATCH($A10,NetPrem!1:1,0))}')>367269

Sheet1

To see the formula in the cells just click on the cells hyperlink

The above image was automatically generated by[HtmlMaker V1.25]
If you want this code, click here and Colo will email the file to you
This code was graciously allowed to be modified: by Ivan F Moala All credit to Colo


Thanks,

RET79
RET79 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:19 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes