The total of part of a series of numbers
Questions tagged [subtotal]
398 questions
2
votes
3 answers
Calculate subtotal with special condition
id
flow
amount
date
1
IN
100
2023-08-01
2
OUT
100
2023-08-02
3
IN
100
2023-08-03
4
OUT
100
2023-08-04
5
OUT
100
2023-08-05
In a table like above, I want to sum all OUT transactions which take place after every IN transaction. The…

user16462786
- 115
- 6
2
votes
2 answers
How to calculate running total of the subtotal
So I need to calculate a running total of both "sub_total" so both of these prices are added together and display in the "overall_total" variable. Currently, the output is showing $20.00 instead of $310.00. I am not sure how to make it add the price…

Tara
- 21
- 2
2
votes
0 answers
Subtotal in result row returns 0 in excel table
I have an excel table ("lstTestSource") like this:
I have a second excel table ("lstTestResult"), which evaluates the first one:
There is a formula in each row in the second column…

Sergeij_Molotow
- 83
- 7
2
votes
1 answer
Magento 2 / Prices and subtotals with 4 decimals But VAT and Totals on 2 decimals
I had to change prices to 4 decimals and it's OK.
However, i have sometimes rounded cent in totals which is wrong. The explanation is that all calculations (subtotal, VAT and total) are on 4 decimals then rounded to 2 decimals.
With rounding,…

Aurel
- 338
- 2
- 13
2
votes
1 answer
Round cart subtotal in WooCommerce
While using this code I can manipulate the subtotal (It works correct)
add_action( 'woocommerce_calculate_totals', 'action_cart_calculate_totals', 10, 1 );
function action_cart_calculate_totals( $cart_object ) {
if ( is_admin() && ! defined(…

CJabber201
- 97
- 8
2
votes
1 answer
How Can I Suppress Google Data Studio Pivot Table Subtotals When Only One Detail Line Exists
I am trying to leverage a Google Data Studio pivot report template to show sales performance by employee. No problem; however, the report is too-busy in terms of providing a subtotal even if there is only one line to be "totaled". There is no…

Vector7
- 107
- 1
- 7
2
votes
1 answer
Google Sheet countif only visible data using sumtotal
Sell / Buy
Buy
Buy
Sell
Hi all,
I have google sheet that has a lot of Data However, i want to count number of "Buy" and "Sell" based on filtering the dates NOT the whole column ONLY VISIBLE rows
The code i'm trying to use is the…

Deyaa
- 123
- 1
- 2
- 11
2
votes
3 answers
Adding a row with subtotal by category to my dataframe
I have created a new aggregated dataframe by using groupby and I am having problems with adding a subtotal row under each category.
I have tried using pd.groupby and pivottable and changing the index but I don't manage to represent the data as I…

CJ123
- 27
- 1
- 3
2
votes
2 answers
How to calculate subtotal in postgreSQL
I have a table like this
ID amout1 amount2 amount3
1 10 0 3
1 20 1 1
2 5 2 2
2 0 3 11
I want to calculate subtotal for each…

HenlenLee
- 435
- 1
- 11
- 30
2
votes
2 answers
How to remove subtotal from a excel pivot-table with mutiple data fields useing vba
I can't remove all subtotals from a pivot table if it has more than one data field.
Nomatter how many row or columns labels it has, it wotks as long it has only one data field. Here's my code:
Option Explicit
Private Sub pivot_table()
Dim wkb…

Rildo
- 35
- 1
- 8
2
votes
3 answers
Subtotal for each level in Pivot table
I'm trying to create a pivot table that has, besides the general total, a subtotal between each row level.
I created my df.
import pandas as pd
df = pd.DataFrame(
np.array([['SOUTH AMERICA', 'BRAZIL', 'SP', 500],
['SOUTH AMERICA',…

Clayton Tosatti
- 196
- 1
- 4
- 20
2
votes
0 answers
Subtotal array formula does not count cells accordingly
Recently i've encountered an issue with the subtotal array formula. To be more explicit, i have the following scenario:
In my workbook i have two different sheets: Statistics and Bugs
In the Bugs sheet i have a query which updates with the latest…

Adi Petrescu
- 121
- 1
- 3
- 12
2
votes
1 answer
Cannot insert subtotals into pandas dataframe
I'm rather new to Python and to Pandas. With the help of Google and StackOverflow, I've been able to get most of what I'm after. However, this one has me stumped. I have a dataframe that looks like this:
SalesPerson 1 SalesPerson 2 …

user3303984
- 48
- 4
2
votes
2 answers
Excel: Calculate difference between cell and cell above in an auto filtered table
I have a table with column A containing incrementing numerical values, and column B being a bunch of names. I need to filter the table according the names, and have column C update with the difference between the value in column A in the current row…

bigbumbly
- 33
- 4
2
votes
0 answers
Woocommerce pdf invoice- Display subtotal that includes discount and without tax?
I'm using a woocommerce plugin (Woocommerce pdf invoice & packing slip), I have been trying to make this happen, I was close to achieving it but it occurred some bugs when there is tax included.
So I’m looking to display a “Subtotal after discount”…

Ming Lu Lee
- 53
- 8