Monday, June 20, 2016

subtracting recent data from previous data


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.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPCf-y7fRNY84H%3DKE_6B4WevNQCirWqzqN4b%2BOTcetQS478bAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment