Questions tagged [subtotal]

The total of part of a series of numbers

398 questions
24
votes
10 answers

dplyr summarize with subtotals

One of the great things about pivot tables in excel is that they provide subtotals automatically. First, I would like to know if there is anything already created within dplyr that can accomplish this. If not, what is the easiest way to achieve…
Kyle Ward
  • 889
  • 1
  • 8
  • 18
11
votes
2 answers

Python (Pandas) Add subtotal on each lvl of multiindex dataframe

Assuming I have the following dataframe: a b c Sce1 Sce2 Sce3 Sce4 Sce5 Sc6 Animal Ground Dog 0.0 0.9 0.5 0.0 0.3 0.4 Animal Ground Cat 0.6 0.5 0.3 0.5 1.0 0.2…
pbou
  • 298
  • 3
  • 13
10
votes
2 answers

Pivot table subtotals in Pandas

I have the following data: Employee Account Currency Amount Location Test 2 Basic USD 3000 Airport Test 2 Net USD 2000 Airport Test 1 Basic USD 4000 Town Test 1 Net USD …
Tony
  • 103
  • 1
  • 1
  • 4
10
votes
7 answers

Calculating subtotals in R

I have a data frame with 900,000 rows and 11 columns in R. The column names and types are as follows: column name: date / mcode / mname / ycode / yname / yissue / bsent / breturn / tsent / treturn / csales type: Date / Char / Char /…
Mehper C. Palavuzlar
  • 10,089
  • 23
  • 56
  • 69
9
votes
2 answers

Subtotal cart variable php WooCommerce

Does anyone know what $variable to use in php to get the subtotal of the cart? Subtotal = total value of cart BEFORE discount or taxes. It would help me a lot. I want to add an extra fee if the subtotal is above 250 euro. Thanks in advance.
Cedric De Clercq
  • 163
  • 2
  • 2
  • 4
9
votes
1 answer

pandas groupby aggregate with grand total in the bottom

Here is my code: import StringIO from pandas import * import numpy as np df = read_csv(StringIO.StringIO('''Col1 Col2 A B A D 1 6 A E 2 7 B D 3 8 B E 4 9 C D 5 19'''), delimiter='\t') df['buc1'] = cut(df['A'],…
Jason
  • 131
  • 1
  • 1
  • 4
7
votes
1 answer

C# - itextSharp subtotal on every page

The solution for C# you can find in the Edit-Part of the Question. Special Thanks to Bruno Lowagie I'm trying to create an invoice via iTextSharp in C#. It works very well but im gettin problems while i try to print the subtotal on every page. Here…
Martin S.
  • 142
  • 9
7
votes
2 answers

SQL SERVER T-SQL Calculate SubTotal and Total by group

I am trying to add subtotal by group and total to a table. I've recreated the data using the following sample. DECLARE @Sales TABLE( CustomerName VARCHAR(20), LegalID VARCHAR(20), Employee VARCHAR(20), DocDate DATE, …
alejandro zuleta
  • 13,962
  • 3
  • 28
  • 48
7
votes
2 answers

Excel 2010, VBA and ListObjects subtotals not updating on Table changes

So, having this structure (starting at A1 - show snippet > run): table { border-color: #BBB; border-width: 0px 0px 1px 1px; border-style: dotted; } body { font: 12px Arial, Tahoma, Helvetica, FreeSans, sans-serif; color:…
Zenigata
  • 360
  • 1
  • 3
  • 12
6
votes
3 answers

Can you subtotal rows and/or columns in a pivot table?

I have a set of queries that outputs a pivot table. Is it possible to obtain row and/or column subtotals for a pivot table ? My table I am selecting from looks like this Site FormID Present Site 1 Form A Yes Site 1 Form B…
user918967
  • 2,049
  • 4
  • 28
  • 43
6
votes
2 answers

How do I create a report with subtotals and a grand total in Power BI?

Currently, I'm using the Power BI Designer (newest version). I'm completely new to it. I'm wondering how to get the subtotal of a group of items and then get the report grand total. I only need the subtotal for one column (ie. price). The grouping…
dotnetN00b
  • 5,021
  • 13
  • 62
  • 95
5
votes
4 answers

GROUP BY using parameters in SQL

I am trying to somehow group a report based on a drop-down list of parameters that is pre-defined. I want to be able to subtotal the Total Hours or Total Pay of my report based on Department or JobCode. I have created the parameters and have no…
Jeff Trujillo
  • 53
  • 1
  • 1
  • 4
5
votes
1 answer

Change Excel formula to total only visible cells

I'm using the following formula to create a total of unique values =SUM(IF(FREQUENCY(MATCH(C4:C9,C4:C9,0),MATCH(C4:C9,C4:C9,0))>0,1)) However, I'm now using an autofilter, so I now need it to sum only the visible rows. I've read that I need to use…
Mitch
  • 2,471
  • 8
  • 38
  • 46
4
votes
3 answers

Implement Subtotal feature of Excel

Excel provides the Subtotal option from the Menu Data -> Outline -> Subtotal. It creates automatically the sub-sums and the possibility to fold the data. The image below demonstrates how the action transforms the sheet. And this is exactly what I…
Kai
  • 38,985
  • 14
  • 88
  • 103
4
votes
3 answers

rails way to calculate subtotal and total

Context: I have 2 models Order and Item. I want to calculate Item subtotal based on item.quantity * item.price For now this is done in the view (but not the appropriate place). <%= number_to_currency(item.quantity * item.price) %> I also need to…
Gaelle
  • 599
  • 2
  • 6
  • 24
1
2 3
26 27