Questions tagged [running-balance]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

DAX consolidated running balance from two fact tables

I have this simple data model w/ two fact tables that pertain to purchases and sales of shares of stock: I need to calculate a running balance by taking a running sum of shares purchased by ticker ...
leolapa's user avatar
  • 43
0 votes
0 answers
9 views

Check Discrepancy of Running Balance

i want to check discrepancy in running balance in SQL ,want to find a row from after where my running balance not correct could anyone please guide me in this problem will be thankfull to you i ...
Saqib Hussain's user avatar
0 votes
0 answers
32 views

Oracle query for running total

I have the below table and trying to derive the result in the 'expected output' column. I have mentioned the logic on how I derive it in the 'logic' column. enter image description here I tried using ...
oracledb2's user avatar
0 votes
1 answer
126 views

Get minimum value per user

I have this SQL code here, my wish is to calculate the latest fee balance per student for each deposit made. So far I have been able to achieve this but now the question is how I'm I to select only ...
John Rohosafi's user avatar
0 votes
1 answer
70 views

Running balance in Sheets - Deduct row from total deposits

Sheet 1: I have a list of jobs in column A, for each job there is a charge of $10 in column B unless it was canceled in which case it will display 0. Sheet 2: I have a list of payments and a sum of ...
Aleksandar Rašević's user avatar
9 votes
1 answer
715 views

SQL Server : running Sum() Over Partition

I am working on a MS Access frontend with a SQL Server 2017 as backend storing tables and views. I want to calculate (on the SQL Server side) the quantity of stock (Bestand), remaining stock (...
Java-Jim's user avatar
0 votes
2 answers
284 views

Running Balance on Union Tables

The code below computes the running outstanding balance for the tables ACCOUNT and PAYMENT: select b.payment_date, a.account_no, a.accountname, a.loan_amount, b.amount, ob = a....
Joey's user avatar
  • 391
-4 votes
1 answer
127 views

Rolling Balance SQL

Hello I need some help please I have the following select statement But the rolling balance seems not to be working. Select Distinct Substring(Convert(Varchar(10), M.ValueDate, 101), 0, 11) ...
CodeGuy's user avatar
  • 13
2 votes
1 answer
2k views

Selecting sum and running balance for last 18 months with generate_series

I have this working query, but I need to add all months to my result, no matter if the items sold during that month: select * from ( select to_char(max(change_date), 'YYYY-MON')::varchar(8) as ...
markdueck's user avatar
0 votes
2 answers
2k views

How to update running balance in one shot?

I have a temp table, let's call it #invoices, defined as create table (id int identity(1, 1), billed money, credited money, balance money) i have the following data in it Billed Credited 140.00 ...
AngryHacker's user avatar
  • 59.7k
0 votes
1 answer
481 views

Subtract from an input appended list with a running balance output

Noob I am trying to write a script that gives a running balance. I am messing up on the elementary declared functions of python. I need it too: accept a balance via input append a list of ...
user avatar