Sum Total Of Calculated Field In PivotTable
i have a database of monthly sales of a regional distributor and im using a pivot table to manipulate my data. i want to show only what account makes a positive sales for a specific product and i want to get the total number of accounts who have the positive sales. there are multiple entries in my database, the condition is if an account have positive sales of a specific product regardless on how many times the account bought the result should be 1 (meaning one buying account)
i've tried to use a calculated field in my pivot table, i get the correct result per account but when it comes to grand total its not getting the sum of the total number of accounts. here is the sample of what i need to get..
you can see that there are multiple entries but it shows only 1 per account when it has at least 1 positive sales of a specific product and 0 if it hasn't any sales/negative... and for the total it adds the number of accounts to get the total number of buying accounts..
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
PivotTable Calculated Field With IF Function/Formula
I have a PivotTable which shows the number of packs produced in a month. I created a calculated field which shows the number of vehicles needed to move these packs. The number of packs per vehicle is dependent on two criteria, the Pack Description and the Store. My calculated field, Shunts, is described as: =Packs / IF(Store ="Middlewich",IF('Pack desc' ="Tall",30,60),IF('Pack desc' ="Tall",26,52)) which represents the logic Middlewich & Tall = Packs / 30 Middlewich & other = Packs / 60 Other & tall = Packs / 26 Other & other = Packs / 52 However, it doesn't work! I know Calculated Fields can be difficult to work with, but this is crazy and I think I'm missing something obvious as I'm sure I've had IFs work like this before! I've attached my example, also showing the values I'd expect to see.
View Replies!
View Related
Grand Total Of The Calculated Field Returns Wrong Results
i have a problem regarding calculated field.. i have data of sales of a distributor with all the accounts that he handles.. i want to get the total number of buying accounts for that distributor.. buying account is an account that bought a specific product for at least one time... even the account buy 2 or 3 times more for that specific product the account is considered as 1 buying account.. i want to use a pivot table so i can manipulate the data.. first i tried to add an additional field to my data and put the formula "if(norbo_val>0,1,0)" where norbo_val is the total sales less the rejects. it means if ever an account have positive sales the account is considered as a buying account for that specific product. my problem is that when that account bought the same product for 2 or more times it sums all the times an account bought for that specific product.. so i decide to remove the field in my data and create a calculated field in the pivot table. i input the same formula to the calculated field and it gives me the correct result where if ever an account bought a specific product for at least one time regardless on how many times the account bought that same product, the account is considered as 1 buying account. the only problem i am encountering now is that the grand total is not summing up the total numbers of buying accounts if i list all the accounts. it seems the formula is affecting the grand total where it should add the total of buying accounts but instead using the formula of the calculated field so the result is only 1.
View Replies!
View Related
PivotTable Code: The PivotTable Field Name Is Not Valid
The code I'm using that results in the following error message: "RunTime Error '1004': The pivotTable field name is not valid. To create a pivottable report, you must use data that is organized as a list with labeled columns. If you are changing the name of a pivottable field, you must type a new name for the field." Here's the code, I've seperated it into each sub hoping that will make it easier to read: Option Explicit Sub main_prog() Call td_metrics_import Call pt_td_metrics("Pivot_Page1", "PivotTable1", "PivotTable2") Call pt_td_metrics("Pivot_Page2", "PivotTable3", "PivotTable4") Call create_graph End Sub...............
View Replies!
View Related
PivotTable Error: Field Name Is Not Valid.
I successfully created two PivotTables two days ago, but when I added more rows of data to the source worksheet I could not refresh either PivotTable view. So after much frustration, I deleted both worksheets and again tried to create a new PivotTable using the wizard. I keep getting this error, and have no idea what it is telling me so that I can go about fixing it: "The PivotTable field name is not valid. To create a PivotTable report, you must use data that is organized as a list with labeled columns. If you are changing the name of a PivotTable field, you must type a new name for the field."
View Replies!
View Related
Show All Items Of PivotTable Field
I have a section of code that takes SO long, but I have to have it. Bascially, I need a pivot field to be set to "All", but there HAS to be a faster way. Here's my Sub FloorCompareSetter() Dim pt As PivotTable Dim pi As PivotItem Set pt = ActiveSheet.PivotTables("PinPointPivot") ' Speeds up code dramatically pt.ManualUpdate = True 'Set the floor comparison for managers, coaches, and reps ' Make sure all PivotItems along line are visible For Each pi In _ pt.PivotFields("Manager").PivotItems pi.Visible = True Next pi pt.ManualUpdate = False End Sub Auto Merged Post Until 24 Hrs Passes;Also, note that I have used other techniques to speed up the process: With Application . ScreenUpdating = False .EnableEvents = False .Calculation = xlManual End With
View Replies!
View Related
Sumif Function In Pivot Calculated Field?
I'm getting an error message in when I attempt to create a pivot table calculated field formula using the SUMIF function. My questions are (A) Can SUMIF be used in a pivot table calculated field and (B) If Yes, then why am I getting an error message? To expand more on my second question(B). My scenerio is as follows. I need to compute the Total Inventory Value (Quantity X Cost) of all our inventory that is aged over 60 days. I have a "Total Value" field that gives me the inventory value at a sku level. also have a "Days Since Last Receipt" (DSLR) field that gives the Days since the Inventory was last Received at a sku level. For Example: SKU A Total Value=$100  DSLR=50 SKU B Total Value=$75  DSLR =70 SKU C Total Value=$40  DSLR =80 Using the above scenerio and example I tried to execute this calculated field formula: =SUMIF(DSLR,">60",Total Value). However I get an formula error message.
View Replies!
View Related
Retain Calculated Field Number Formatting
I use pivot tables extensively in my job. I have several spreadsheets that feed from acess database tables to build pivot tables. Besides the fields imported from Acess, I also create calculated fields. The problem is, for both the calculated fields and the imported fields, the number formatting does not stick. I know how to go to field settings, then to number, and change the customized format. The problem is, once I take that field out of the pivot table and bring another one with a different format (say, bring a field with currency format and take away one field with a percentage format) and then bring the original field back to the privot table, the number format is gone. This is really annoying since I work with dozens of fields, and it takes time to change the number settings every time I change fields on the pivot table, and the number of decimal places, etc. I stress that I know how to change the number formatting on fields, it's just that it excel does not remember it afterwards. I thought that maybe the formulas in excel might allow one to include the formating, but I have not been able to find if this is possible, and if so, how to do it. So, for example, the following formula for a calculated field: =IF(ISERROR(Contribution/'Block Hours'), "0", (Contribution/'Block Hours')) would be nice if the formula itself could include the number formating. I tried including something like , 0.00% at the end, but it does not work.
View Replies!
View Related
Listbox Result To Pivottable Current Page Field
I am thinking of using a listbox so a user can select a product to graph. What I want to know, in VBA, is how do I use the selection the user makes and use it in a pivot table current page field? The listbox returns a number whereas I want the text. I can use the number when it is linked to a cell and a vlookup to get the text but how do I get the text into the current page field?
View Replies!
View Related
Pivottable Total Include Hidden Items
I am using Excel 200o to create a PivotTable but am having problems wiht the Totals. Is it possible to create a PivotTable that includes hidden items in the Totals (row)? I tried the Subtotal Hidden Page Items option but this seemed to do nothing to the Total or subtotal.
View Replies!
View Related
PivotTable Field > Summarize By: "MEDIAN"
I am hoping that someone has a workaround for this as I am unable to find anything using extensive web searches. Excel 2003 on a PC running Windows XP. I need to be able to summarize Pivot table field settings by MEDIAN. Excel allows me to summarize by AVERAGE but there is no option for MEDIAN. To get to the function On the PivotTable toolbar click on "Field Settings". Under the "PivotTable Field" look at the options provided in the "Summarize by:" field.
View Replies!
View Related
Inclusing Calculated Cells In SUM
It is a few years since I worked in the IT industry and used EXCEL a lot. I want to use (formula) SUM on a cell which 'sums' 3 other cells one of which has a the result of a formula but the result of that SUM is always 0 (zero). I am sure I can remember doing this in the past but cannot determine how it is done. eg. Cell Contents C10 1000 (value) C11 =A1*(A10/A20) (formula) C12 2000 (value) C13 =sum(C10:C12) What do I need to do so that (cell) C13 results in the correct value instead of 0 (zero)
View Replies!
View Related
Calculated Cell Values With Sum, Max Formula
I've got a sample spreadsheet that I'm trying to get the MAX from a Range of cells that only begin with "TMP". Problem is, if I use MAX or SUM to try to calculate the largest number (or a sum, just to test), it returns "0" for the caluculated range. If I Copy and Paste Values, the MAX or SUM formulas still don't work. Only if I edit the cell and hit the ENTER key will the Formula(s) work, for each cell in the range that I edit/ENTER. All cells are formatted the same (GENERAL), and I'm not working it into a VBA Macro (just yet).
View Replies!
View Related
Inserting A Total Amount Field In Each Empty Row
to run a macro that enters a new row after each set of currencies (which have been sorted). I now need to enter a total balance cell within this empty row which calculates the total amount for each currency. I need to do this using the SUMIF function below: SUMIF($J$3:$J$300,"L/C",$I$3:$I$300)SUMIF($J$3:$J$300,"L/D",$I$3:$I$300) the above basically lets me calculate the total but as no  and + signs were input it does this by recognising the 'dr' and 'cr' in the column next to the amount.
View Replies!
View Related
Sum The Time Field And Vlookup
I need to sum the Time field, if the Temp Zone is = F. My problem is, as shown on the sheet, there are multiple days. As well, I need to pull the information for the totals (looking at 6 days worth of info) into another worksheet where the names (first column) are not in the same order, as some of the names are on this sheet, and some are not. I had a massively large vlookup statement, but of course, it's rather large and doesn't copy over well (when changing the days, it looses the last couple of lookups) ......
View Replies!
View Related
Get A Sum Total Based On Three Criteria
I've got a spreadsheet with headers in column A and in rows 9 and 10. The headers in column A start in row 11 and are sizes (i.e XS, S, M, etc..). The headers in row 9 start in column B and are names (ie. First, Second, Third). The headers in Row 10 can be either Net Sales or On Hand Units. There are then values starting in B11 to L19. The headers in column A do not repeat but the headers in row's 9 and 10 can repeat. What I need to do is create a function for a report page that will total all of the values that match to a particular header in column A, the header in row 9 and the header in row 10. So for example I would want to get the total for any instance when the header in column A is M, the header for row 9 is Second, the header for row 9 is Net Sales. I've attached a sample of what my data dump would look like as well as the separate reporting worksheet where I want the totals to appear.
View Replies!
View Related
Sum Total Numbers For Only A Certain Date
I'm working on an excel for work. It lists the days on the column farthest left, and with some variables calculates the total number of tons we have for the day on another column. For part of it I'm wanting the program to calculate how many tons we process for each day. The problem is that each days will have a different number of entries. For example: June first has 6 entries June second has 3 entries June third has 4 entries So I'm wanting to make another column seperate from the original data that calculates total number of tons from the entries for the day without saying cell=sum(the 6 entries from the first), cell=sum(3 entries from the second). I'm not sure how to go about this, I thought if I could get a recurring if statement that would test all of the entries for the date, and if it matches sum them up. I'm just not sure how to go about it.
View Replies!
View Related
Create Sub Totals And Sum Total
Attached is an example of the workbook I am looking for: A macro will take the sheet "Data" and split the info across into new separate worksheets labelled "SIM","MOR","RED","CAR","EMB". The split worksheets contain the same info as "Data" however the column for "Total Arrears" is sorted as descending and the moment values become negative, there is a 5 row gap to seperate the Positive amounts and Negative amounts in a descending order What needs to be completed: I need to create Sub Totals in columns E:K for both the negative and Postive balances (and Label them as "Sub  Total" in column D) as well as have them represented as a percentage, and then after that have a grand total value represented at the bottom. I have attached examples of what the final product should look like for each worksheet (they are labelled in blue) The problem I have is that I am unsure of how to use VBA to recognise where to put the amounts for Sub Totals. I would assume it would use a .End.xlUp.Row and some kind of Offset, but I don'r even know where to begin. The "Data" sheet has a button that runs the macro to split the data into worksheets, but the worksheets SIM/MOR/RED/CAR/EMB must be deleted first since there cannot be duplicate sheets (which is why there is also a button to delete those sheets)
View Replies!
View Related
Subtract Cell From A SUM Total
would like a very small macro for the following: Units units remain day 1 day 2 day 3 ... day 13 MACRO The units are the total number of units that can be bought ( in a game) and these are purchased on a daily basis. I would like a column " units remain" as units are purchased to just count down auotomatically as numbers are entered into the daily row. Thus: 11 xx day 1 day 2 Where xx would chage as numbers are entered into day 113 ( these will be either 1 or 2).
View Replies!
View Related
Rank Groups By Sum Total
I'm trying to set up a formula to rank clients within a salesgroup by their total value. Normally I'd do this using sumproduct, but it doesn't seem to work in this instance as I get 'gapped' results. Sample data: ClientGroupProduct EV cust AAfricarubber 70 cust BAfricacotton 75,000 cust CAfricarubber 4,384 cust AAfricacotton 51 cust AEuroperubber 234 cust CEuropesteel 5 cust BEuropeconcrete 0 cust CEuropesteel 4,384 cust AEuropeconcrete 28 cust CEuropeconcrete 37,132 cust AEuropecotton 18 cust ANArubber 6,750 cust BNAsteel  cust ANAconcrete 35 cust BNAsteel 250,000 cust BNAconcrete 30,000 cust ANAcotton 117,470 cust CNAsteel 800 So each Client has multiple entries by product and salesgroup with need to be summed, and then I'd like to rank each client within each salesgroup. So within each salesgroup I'd like these clients to be ranked 1, 2, 3. (Highest total as 1.) So for Africa, cust B is 1, C is 2, and A is 3. Europe  C is 1, A is 2, and B is 3 NA  B is 1, A is 2 and C is 3 Ideally I'd like to not have to sort the data in any way before running the formula. And I have about >10,000 rows, so an array formula would take a very long time to run.
View Replies!
View Related
Total Sum Of Multiple TextBoxes
My userform requires a user to enter amounts in 5 different textboxes.(textbox15) I have created a textbox6 to attempt to capture the totals (should be numerical) of textboxes15, even if this textbox figure is a 0 or a minus figure. I have browsed a few other posts with roughly the same issue and have come up with some basic code as per below... the code is pasted into each (textbox 15) textbox_change() code. If TextBox1.Value = "" Then Exit Sub If TextBox2.Value = "" Then Exit Sub If TextBox3.Value = "" Then Exit Sub If TextBox4.Value = "" Then Exit Sub If TextBox5.Value = "" Then Exit Sub TextBox6.Value = CDbl(TextBox1.Value) + CDbl(TextBox2.Value) + CDbl(TextBox3.Value) + CDbl(TextBox4.Value) + CDbl(TextBox5.Value)
View Replies!
View Related
True Or False To Disply As A Sum Total?
Hi, I am doing a spread sheet for work and just have a little issue. I have two time fields in the spread sheet and if one is less then the other it reads true and turns green but if it’s greater then it reads false and goes red. Is there a way of it to say how much the time is under or over the original instead or just reading true or false?
View Replies!
View Related
Sum The Total And Find The Average Cost
I need a formula that will scan column A (Code)total the like items (also) add column B (Qty) if there is a number greater than 1. Then add the price ($) together and divide by the sum of A&B. In other words find the average price for the total of each item.. A B C Code Qty $ PH06003000 1 1504.8 PH06003000 1 1582.24 PH06003000 1 1606 PH06003000 1 1504.8 PH06003000 2 3009.6 PH06003000 1 1504.8 PH06003000 1 1504.8 PH06003000 1 1504.8 PH06024000 1 2499.2 PH06024000 1 2499.2 PH06024000 1 1896.07 PH06024000 2 3909.66 PH06024000 1 2240.7 PH06024000 1 2259.4 PH06024000 15 30030 PH06024070 1 2039.4 PH06024070 1 1958.66 PH06025670 1 2521.2
View Replies!
View Related
Determining A Sum Total When There Are Multiple Conditions
below the following lists (Name, Week, Amount) I am trying to calculate a sum of the Amounts column (Column D) for two conditions: a particular week # (Column C), for a particular color (Column A). Is there a simple formula to SUM numbers when it is based upon two conditions (color and week #)? For example, there are two separate RED amounts that should be received in Week 4  how do I write a formula for the cell that correlates RED and WEEK 4 that states "sum the amounts for the Name: Red and Week: Week 4"? NameWeekAmount GreenWeek 1 5,000 RedWeek 4 13,000 BlueWeek 1 1,500 GreenWeek 3 3,500 GreenWeek 2 4,200 PurpleWeek 5 1,200 YellowWeek 4 500 GreenWeek 3 25,000 RedWeek 4 13,000 RedWeek 3 12,500 RedWeek 1 10,000 BlueWeek 5 9,000 BlueWeek 3 14,500 YellowWeek 5 3,300 GreenWeek 2 1,000 YellowWeek 4 30,000 Week 1Week 2Week 3Week 4Week 5 Red Yellow Green Blue Purple TOTAL
View Replies!
View Related
Sum Total For Varying Number Of Cells
ABC 1100 211/29150250 311/29300300 4200 5300 6150 711/30100750 Have column A with date, column B with subtotal, column C with Total. The Total (C) is made up of one to five subtotals (B). Subtotals to be included in the Total are those that come after the previous Total up to the row with a date. Only a row with a date has a Total. Is there a formula that can do this?
View Replies!
View Related
Sum The Total Hours By Project Between Two Dates
I need to sum the total hours by project between two dates. There can be multiple projects and the two dates can vary. So... In column A are the project # (say A2 001, A3 001, A4 002, A5 003) In column B is Yes or No for each project (contract Signed?) In Column C through Z, row 1, are dates (shows the Monday of each week) In Column C through Z, row 25 (which corresponds to the projects 001, 001, 002, and 003 above) are the number of hours worked that week. On a separate tab (lets call it MonthTab) is the start and end date for each month (Jan through Dec) On a separate tab I want to SUM the hours by Month for each project (so for project 001 would need to go across multiple rows), that has a Yes in column two. Therefore the hours summed For January will be taken from MonthTab and be between StartJan and EndJan.
View Replies!
View Related
Sum By Name & Hours For Total Amount
I have pivot tables where I need to look through a series of names and sum the hours and dollars charged by that person. When I try to do a pivot I can get it to read column 1 Column 2 John Doe $4000 Mary Smith $ 500 But if I try to add the hour columns it breaks it out by the week the hours was charged column 1 Column 2 Column 3 John Doe $2000 4 2000 4 Mary Smith $ 250 5 250 5 I want it to just give me one dollar total and one hour total per employee.
View Replies!
View Related
Sum/Total Values In Array Macro Code
I have created an array in Excel VBA 2003 and successfully loaded it with values. The array variable is called "Week". I am currently getting the sum of the numbers in the array by creating a dim variable that adds them statically one at a time: Dim finalvalue As Integer finalvalue = week(1) + week(2) + week(3) That works, except as time goes on there are more weeks and I need to dynamically add all the values together in one fell swoop.
View Replies!
View Related
Return The Total Sum Of Values Between Two Specific Dates
Sheet1 BCDEFGHIJ2Product10/08/200917/08/200924/08/200931/08/200907/09/200914/09/200921/09/200928/09/20093A228157989393994B1784371107922385C4483398261701298 Excel tables to the web >> http://www.exceljeaniehtml.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4 And I am after a formula that will return the total sum of values between two specific dates. So if my results table looks like the one below, the values the formula would return are shown in Cells E9:E11. Sheet1 BCDE8ProductStart DateEnd DateTotal9A24/08/200914/09/200934110B10/08/200907/09/200918511C31/08/200921/09/2009225 Excel tables to the web >> http://www.exceljeaniehtml.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4
View Replies!
View Related
Pivot Table Grand Total And Sum/count
I started a pivot table for our budget and on the left side I have the account names and about 4 columns of applicable account codes to which I turn on and off when needed. On the right side I have all the budget numbers divided by quarter and halfs. On the right side, I can drop any list of numbers and it does the sum but for some reason, when I drop my 4th quarter numbers, it gives me a count and not sum. How do I change it to sum? Second problem: I have grand totals number going down the columns meaning I have a sum of all my 1st Quarter numbers but I do not have them going across each line on row. How do I add that? Third problem: I forgot a list of account codes to be put on the left, how can I add it?
View Replies!
View Related
Sum By Conditions & Rolling Monthly Total
I have a pivot table that summarizes expenses (cash advances, cashe remitted, etc.). The issue that I'm having is the way the data is displayed on my pivot table. When I adjust the custom calculations to "show data as Running Total in MONTH" I get the desired outcome on my row totals, but I do not get the correct figures on the actual data within the Pivot Table. When I remove this custom calculation and just "sum by value" then the data is correct, but the row totals are not. In a perfect world I would need the values to sum by value, while the row totals are set to "show data as running total in MONTH". I'm not smart enough to figure out how to produce both.
View Replies!
View Related
Sum Each Order On Another New Coloum Which I Will Create Called Total Weight
Hi Guys, im really stuck and could use one of your expertise. i have an excel spreadsheet with 65,000 lines of data i have 9 Coloums in the the file Despatch DateCustomerDseqOrderLineItemPost CodeVol m3Gross Kg 13/02/09jason00002029095R055TR4 8QQ0.1099280.3313/02/09jason00002034741R043TR4 8QQ0.31621218.313/02/09jason00002034742R064TR4 8QQ0.8793673213/02/09jason00002034743R045TR4 8QQ0.94863684.9 i need a line here to sum it before the next order starts? 13/02/09jason200002033141A157WD18 7QX0.02832113/02/09jason200002033142A096WD18 7QX1.609288213/02/09jason200002033143A125EJAWD18 7QX0.849646.813/02/09jason200002033144A09JJAWD18 7QX0.13732102.8 im trying to create a formula that will sum each order on another new coloum which i will create called total weight i need it to search the date then the customer name then the gross kg and total them up as there is multiple orders
View Replies!
View Related
A Formula That Will Sum The Total Of Different Cells Based On An Initial Variable
Im trying to make a formula that lets you type in your current level, and then calculates how much XP you have remaning untill you reach the max level. The way the forumla would need to work would be something like this: (E10) Enter Current Level: (F10) 37 (which is my current level) F11  would then add cells from C37 to C70 (calculating the total amount of XP required) and then display in (F11) Being able to say if, then is far to cpmplicated for me in excel. I'm just trying to make this for a bit of fun and am sure one of you talented people can easily do this.
View Replies!
View Related
Total/SUM Various Times: Calculate Various Lengths Of Time Within A Column
Need a ormula that will calculate various lengths of time within a column. For example: I would like to be able to add 02:43 (2 minutes 43 seconds) plus 01:10 (1 minute 10 seconds) plus 05:15 (5 minutes and 15 seconds) ..and accurately arrive at the sum of 09:08 (9 minutes 8 seconds) Currently, whenever I input the value of 02:43 and assign the value of 'TIME'.. it reads it as 14:23 (clock time..not length of time.) I will only be using data that follows the format of mm:ss (minutes:seconds).
View Replies!
View Related
Change/Move Pivot Table Row Field To Column Field
In building my pivot table my data that I want to show in the column area is showing up as rows stacked on top of each other. In the column section I'm trying to show Total Budgeted Amount next to Total Actual Amount but on the layout it's showing the two stacked on top of each other is there some kind of hidden key that I'm missing?
View Replies!
View Related
