473,856 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Want to calculate balance

44 New Member
Hello experts!
So, I have a report called Ledger attached herewith.



My problem is that I want to calculate balance by subtracting or adding (according to the stituation) with previous record on each row like in first row (if you peruse the attachment), balance is (5,500) which is correct. In second row, it should be added with Debit amount i.e., 7,000/- which will give result as 1,500/-. What should I do for that very calculation? A quick reply will be highly appreciatable.

Sorry for my bad English. 😊
Attached Images
File Type: jpg Screenshot 2024-06-04 120445.jpg (71.9 KB, 42 views)
Jun 4 '24 #1
1 139
NeoPa
32,584 Recognized Expert Moderator MVP
Hi Aftab.

I think you're looking for the 'Running Sum' option.

This way you can keep an up-to-date tally of all positives (debits) & negatives (credits) in order to create your running balance. If all you want is the Balance summed then that's even easier. Just keep a running sum of each record where [Balance] = [Debit] - [Credit].
Jun 4 '24 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1849
by: Blake Versiga | last post by:
When editing a datagrid (C#) I need to know if the user changed the value of cell AND what the previous value was. Is this possible? If so how do I get the previous value or at least if the cell has changed? TIA Blake
5
3120
by: Ian Oldbury | last post by:
i have a dropdownlist box which has autopostback set to true. Does anynone know if its possible to obtain the value that was in the dropdownlist prior to the postback? i could obviously store this value within a hidden field, however i'd like to do it within the controls properties if possible. thanks ian
6
2170
smiley22
by: smiley22 | last post by:
I would like to know how to check the current value and the previous value entered by user before changes. for example, the form will allow user to enter customer number. The first time user enter 10 then change to 22 customer number : 10 -> change to 22 how do I get the previous value which is 10 in this case thanks...
2
7379
by: David Jackson | last post by:
Hello, I'm using VS.NET 2005. I have a ListView populated with data pulled from a SQL Server database. I have wired up a SelectedIndexChanged event, but I can't find any way of retrieving the value of the previously selected record. For example, if the ListView looks like this:
2
1647
by: Steve | last post by:
How do I get the previous value of a text box ? Is there a way to access the TextBox control state ? Thanks for any direction, Steve
1
2890
by: =?Utf-8?B?cmxt?= | last post by:
I have a gridview, and in the RowDataBound event I do some processing on the data. I need to know if the one of the columns has changed from its previous value, but I do not see how to get the previous value. Doesn't viewstate have that already? I know I can access the current value with e.Row.Cells.Text, and I know I can access a value in ViewState which I have added like ViewState. What I want is something like this....
1
2192
by: philqw78 | last post by:
I have a combo box with a pick list in excel. The combo box fires on double click of a cell with validation If the user then presses the escape key I wnat the linked cell to return to the previous value. So far I have got the double click to copy the original value into cell "A1" Then I have the following code on keystroke for the combo Private Sub PickCombo_KeyDown(ByVal _ KeyCode As MSForms.ReturnInteger, _ ByVal...
7
1279
by: SHAIL1404 | last post by:
Hey dear, i am making a product and in which i use a timer. I want when the product is being start the timer will run and when the product is off the timer will stop. If i again start the product the timer will start from its previous value. I have problem that the timer start from its initial when i start my product. Anyone please help......
2
1217
by: ifclick | last post by:
I want to add a new string inside a cell without deleting its previous value. The goal is one asset is part of multiple kits like a resistor. So i need a cell inside resistor asset with multiple value like (kit 1, kit 2, kit 3). Question: If I add a new kit with a resistor asset, i have to update that cell inside resistor asset. But when i do a update query it replaces the current value of that cell to the value of 'Update to' inside the...
2
1478
by: Tilala | last post by:
I Have Few product name with code every day i want add new new value but i need auto fill previous value like Column A1, A2, A3 and A4 A4 = A1-A2+A3 when i add new date than i need Previous Value from A4 in A1
0
9922
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
11066
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10702
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10801
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10391
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7099
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5963
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4177
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.