The total of part of a series of numbers
Questions tagged [subtotal]
398 questions
2
votes
2 answers
Keeping index section (different columns) when subtotal row in pivot table (pandas) is used
I am trying to add subtotal rows in a pivot table (using pandas pd.pivot_table). This is the code table = pd.pivot_table(df, values= ['Quantity', 'Money', 'Cost'], index=['house','date', 'currency', 'family name'], columns=[], fill_value=0,…

Newbie
- 451
- 1
- 3
- 14
2
votes
2 answers
Excel - roundup then subtotal?
A colleague has an array of values in "X4:X38". Since these are in a table which may be filtered, she wants to use the subtotal function to sum them - but wants all of the values to be rounded up first.
={SUM(ROUNDUP(X4:X38,0))}
works perfectly…

Statsanalyst
- 331
- 2
- 3
- 16
2
votes
1 answer
Summing up an average column in ssrs
I need some help with trying to Totaling a column that is taking an average.
The column has an expression of: =avg(Fields!UOS_2017.Value)
I want to sum this column so I would think I could simply do: =sum(avg(Fields!UOS_2017.Value))
BUT this does…

Taimi Martinez
- 21
- 3
2
votes
3 answers
Calculating subtotals in R
Name of member Allowance Type Expenditure Type Date Amount, £
Adam Afriyie Office running costs (IEP/AOE) Incidentals 07/03/2009 111.09
Adam Afriyie Office running costs (IEP/AOE) Incidentals 11/05/2009 111.09
Adam…

ATM
- 21
- 1
- 3
2
votes
1 answer
How to calculate total and subtotal of a table column in itext 7?
In itext 5, it can be used cell events to compute a subtotal of a table column. How can this be done in itext 7?
The itext 5 example can be found in this URL:…
2
votes
1 answer
Woocommerce Exclude Tax from Checkout Subtotal
I am using the hook below to currently exclude tax from the subtotal on the shopping cart. But changing out cart with checkout is not in the docs.
How can I exclude the tax from the Checkout page Subtotal?
Thanks.
add_filter(…

Hector
- 682
- 3
- 14
- 27
2
votes
1 answer
SSRS 2008 - How to add a subtotal to a matrix
How do I add a subtotal to a matrix in reporting services 2008? If I right click on a cell I see an option to add a total but no subtotal.
(I feel like I'm missing something obvious but I've looked everywhere.)

Greg
- 45,306
- 89
- 231
- 297
2
votes
2 answers
subtotal with ddply in R
I am using ddply in R and I break the data in two different ways, but I want a subtotal of both.
This is the function I am using
require(plyr)
dfx <- data.frame(
group = c(rep('A', 8), rep('B', 15), rep('C', 6)),
sex = sample(c("M", "F"),…

megv
- 1,421
- 5
- 24
- 36
2
votes
5 answers
How to split string with subtotal prefix
I want to split string
'something.somethingMore.evenMore[123].last'
to
['something',
'something.somethingMore',
'something.somethingMore.evenMore[123]',
'something.somethingMore.evenMore[123].last']
I can't figure out simple solution to split…

Peter Dub
- 491
- 5
- 12
2
votes
1 answer
Inserting subtotals on demand in PROC REPORT
I have this dataset (an made-up example, but in the same structure):
data have;
infile datalines delimiter=',';
length country city measure $50.;
input country $ city $ level measure $ mdate total;
informat mdate date9.;
format…

seestevecode
- 111
- 2
- 11
2
votes
2 answers
Aggregating (subtotals) in data frame with multiple factor (character) variables
I have a table (data.frame) with numerical data & factors data of which several are character variables (e.g. 'species', 'Fam_name', 'gear') where I want to calculate the subtotals (sum) for the 'weight' and 'number' variables for each 'ss'.
I have…

ErikJS
- 43
- 1
- 8
2
votes
1 answer
Programmatically Sort Data in Excel After Using Subtotal Function Using C#
I have data that I want to apply the subtotal function to and then sort the resulting data in descending order. So far I've managed to get my code to apply the subtotal function and then change the view so it only displays the column I want sorted.…

user3150066
- 19
- 2
2
votes
3 answers
sum count as a column in mysql
I have a table:
id | type | subtype
how shall I create a query to output as following
type1 | subtype1 | count-subtype1 | count-type1
type1 | subtype2 | count-subtype2 | count-type1
type2 | subtype3 | count-subtype3 | count-type2
type2 | subtype4 |…

Crimix
- 399
- 1
- 2
- 11
2
votes
1 answer
Magento Subtotal/VAT error with discount code applied - PayPal wrong breakdown of payment
I am desperately hoping someone is able to assist with this error that seems to be occurring with our magento (version 1.6.2.0) checkout and applying a discount code. It isn't the easiest to explain so I have attached an…

user994319
- 253
- 1
- 7
- 22
1
vote
1 answer
NULL not generated in last line of a GROUP BY WITH ROLLUP query
I have a table containing a Date filed and a number.
I want to display ordered Month names as grouping fields using a query like this:
SELECT
COALESCE(DATE_FORMAT(Day,'%M'), 'TOTAL') As Month,
SUM(Money) As USD
FROM mytable
WHERE
Day
…

GabrieleV
- 2,303
- 2
- 16
- 9