Favorite account balance history

Build and share your cool customized reports built w/ one sql, Chart.js and Lua

Moderator: Renato

Post Reply
sterling
Super User
Posts: 72
Joined: Thu Dec 11, 2014 8:40 am
Are you a spam bot?: No

Favorite account balance history

Post by sterling »

Hi,

This is a graph that i used a lot from GnuCash.  It currently shows 8 favourite account balances over the past year as a stacked bar graph.  I've ended up transposing the table from SQL in JavaScript here so the charting script can display it how i wanted.  I'm going to add a line graph over the top to show total savings per month.

We use this to track savings.
Attachments
Savings Progress v3.grm
(2.46 KiB) Downloaded 872 times
guanlisheng
Developer
Posts: 381
Joined: Wed Dec 21, 2011 5:58 am
Are you a spam bot?: No
Location: China
Contact:

Re: Favorite account balance history

Post by guanlisheng »

Great report and would you please post it to Github ?
Lisheng Guan,
Developer of MoneyManagerEX (http://moneymanagerex.org)
sterling
Super User
Posts: 72
Joined: Thu Dec 11, 2014 8:40 am
Are you a spam bot?: No

Re: Favorite account balance history

Post by sterling »

Sure, I will do.
guanlisheng
Developer
Posts: 381
Joined: Wed Dec 21, 2011 5:58 am
Are you a spam bot?: No
Location: China
Contact:

Re: Favorite account balance history

Post by guanlisheng »

Thanks in advance
Lisheng Guan,
Developer of MoneyManagerEX (http://moneymanagerex.org)
sterling
Super User
Posts: 72
Joined: Thu Dec 11, 2014 8:40 am
Are you a spam bot?: No

Re: Favorite account balance history

Post by sterling »

I've just submitted some improvements to this report.  The legend has been merged into the table and there is now a totals row in the table as well.  Tidier and prettier :).
Nikolay
Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Favorite account balance history

Post by Nikolay »

Several fixes provided
1. Multicurrency support
2. 12 months instead 13 used
3. Human readable labels for months
4. Investment accounts excluded
Attachments
Savings Progress v4.grm
(2.76 KiB) Downloaded 596 times
User avatar
Renato
MVP User
Posts: 669
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Favorite account balance history

Post by Renato »

Hello Nikolay
Nice, but again I miss the total of the month
Renato Forum Administrator
Nikolay
Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Favorite account balance history

Post by Nikolay »

I left the field to the author for creativity.
Nikolay
Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Favorite account balance history

Post by Nikolay »

New version with js fixes and totals
Attachments
Savings Progress v5.grm
(2.93 KiB) Downloaded 647 times
User avatar
Renato
MVP User
Posts: 669
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Favorite account balance history

Post by Renato »

Hello Nikolay
The results from the current month are wrong.
Renato Forum Administrator
sterling
Super User
Posts: 72
Joined: Thu Dec 11, 2014 8:40 am
Are you a spam bot?: No

Re: Favorite account balance history

Post by sterling »

Renato wrote:Hello Nikolay
The results from the current month are wrong.
How are they wrong?
User avatar
Renato
MVP User
Posts: 669
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Favorite account balance history

Post by Renato »

for example:
a) an account that has 2 months zero, suddenly has a balance of 248840.88 in the current month.
b) the exchange rate on foreign currency accounts will not be considered.
Renato Forum Administrator
sterling
Super User
Posts: 72
Joined: Thu Dec 11, 2014 8:40 am
Are you a spam bot?: No

Re: Favorite account balance history

Post by sterling »

Hi Renato,

I'm back in the country and just tried this latest report posted by Nikolay and i get the same results as you for the current month.  Orders of magnitude larger than previous months.

I'll leave it for Nikolay to fix, the HTML side has changed back to the default formatting.
sterling
Super User
Posts: 72
Joined: Thu Dec 11, 2014 8:40 am
Are you a spam bot?: No

Re: Favorite account balance history

Post by sterling »

Here is my latest report, but it does NOT have the latest features from this week from Nikolay.

It has the totals you asked for in the other thread, and growth.
Attachments
History Savings.grm
(3.07 KiB) Downloaded 684 times
User avatar
Renato
MVP User
Posts: 669
Joined: Mon Apr 25, 2011 7:36 pm
Are you a spam bot?: No
Location: near Zurich

Re: Favorite account balance history

Post by Renato »

Hello sterling

The formation like me, however, if an account goes to zero during this time, then it is not listed / considered.
Furthermore, the foreign currencies are not converted.
In addition, there is the problem that in the foreign currency accounts of the exchange rate would have to be taken from the end of the month.
Thus, Total and the Growth are unusable.
Renato Forum Administrator
sterling
Super User
Posts: 72
Joined: Thu Dec 11, 2014 8:40 am
Are you a spam bot?: No

Re: Favorite account balance history

Post by sterling »

I intentionally dont consider an account with 0 balance.

In the SQL you can change line 203 from

Code: Select all

where a.STATUS = 'Open' and a.FAVORITEACCT <> 'blahTRUE'  and a.ACCOUNTTYPE!='Credit Card' and a.ACCOUNTNAME<>'Santander-Joint' and BalanceNow>0
to

Code: Select all

where a.STATUS = 'Open' and a.FAVORITEACCT <> 'blahTRUE'  and a.ACCOUNTTYPE!='Credit Card' and a.ACCOUNTNAME<>'Santander-Joint'
You can also change the Santander-Joint to be an account you dont want listed.
Post Reply