beeficecream / YNABDashboard

Resources required to setup and display Grafana dashboards using InfluxDB data generated through exporting and inserting YNAB budget data
GNU General Public License v3.0
43 stars 6 forks source link

Complete Net/Gain History #4

Open kennylarsen opened 4 years ago

kennylarsen commented 4 years ago

This edit addresses issue #3 (and issue #1 following pull request #2 ). The main problem with getting an accurate net gain/ loss history turned out to be tracking accounts. Whilst there might have been a clever way to design a query I've edited main.py to create a list of On Budget accounts and a seperate measurement in influxDB for On Budget transactions (not as tidy as might be possible with a relational database!). Simply finding the difference between the sum of the income and expenditure gives an accurate net gain/ loss figure which matches YNAB's own reporting. A second gauge could be added to do the same from all transactions to give a net gain/loss for net worth, although this is probably less useful.