subtracting recent data from previous data

10 views
Skip to first unread message

sum abiut

unread,
Jun 21, 2016, 12:47:41 AM6/21/16
to django...@googlegroups.com

Hi,
I need some help with an app that i am working on. i have a csv file that one of our user is uploading and populating data in the database every month. 

here is an example of what it looks like a clear picture is attached.

Revenue Amount    Month       Year
USD Int on FT Deposit 2035     january 2016
USD Int on Treasury Bills 34523432     january 2016
AUD Int on Bond 43243        january 2016
Total Int on Foreign Asset 4324      january 2016
Dealing Profit 4324      january 2016

what i want to accomplish is, every time when the user upload and populate database. I want to get the recent amount that was just upload  and minus the previous amount.

for example: when the user upload and populate data from February, i want to get amounts of February and minus the January amounts. i want do that for all the rows.

I've already build the done the uploading part, just need some help on the calculation part.

test.xlsx
Reply all
Reply to author
Forward
0 new messages