Page 2 of 2

Re: Monthly category report with selectable categories and time range?

Posted: Wed Apr 13, 2022 5:49 pm
by DavidGreen
those lines give me:
SQL logic error[1]: no such column: t1.STATUS

Re: Monthly category report with selectable categories and time range?

Posted: Wed Apr 13, 2022 5:57 pm
by Renato
.
this is my SQL Code:

Code: Select all

-- TODO: Update category and subcategory name in line 19. 
select strftime('%Y', t1.TRANSDATE) as YEAR
    , strftime('%m', t1.TRANSDATE) as MONTH
    , total(t1.TRANSAMOUNT * c1.BASECONVRATE) 
    + (select total(split.SPLITTRANSAMOUNT * c2.BASECONVRATE) from CHECKINGACCOUNT_V1 as t2
       inner join ACCOUNTLIST_V1 as a2 on a2.ACCOUNTID = t1.ACCOUNTID
       inner join CURRENCYFORMATS_V1 as c2 on c2.CURRENCYID = a2.CURRENCYID
       inner join SPLITTRANSACTIONS_V1 as split on t2.TRANSID = split.TRANSID
       where strftime('%Y', t2.TRANSDATE) = strftime('%Y', t1.TRANSDATE)
       and strftime('%m', t2.TRANSDATE) = strftime('%m', t1.TRANSDATE)
       and split.CATEGID = cat.CATEGID
       and split.SUBCATEGID = subcat.SUBCATEGID
       and t2.STATUS <> 'V') as AMOUNT
from CHECKINGACCOUNT_V1 as t1
inner join ACCOUNTLIST_V1 as a1 on a1.ACCOUNTID = t1.ACCOUNTID
inner join CURRENCYFORMATS_V1 as c1 on c1.CURRENCYID = a1.CURRENCYID
inner join CATEGORY_V1 as cat on t1.CATEGID = cat.CATEGID
inner join SUBCATEGORY_V1 as subcat on t1.SUBCATEGID = subcat.SUBCATEGID
where cat.CATEGNAME = 'Haus' and subcat.SUBCATEGNAME = 'Garten'
    and t1.STATUS <> 'V'
    AND TRANSDATE >= '2018/01/01'
    AND TRANSDATE <= '2020/12/31'
group by year, month
order by year asc, month asc;

Re: Monthly category report with selectable categories and time range?

Posted: Thu Apr 28, 2022 5:25 am
by dbolton
I created a new report that lets you select the period and category.

Instructions
  1. Download the attachment below (Category amounts over time.grm)
  2. Open Money Manager Ex
  3. From the main menu, choose Tools > General Report Manager
  4. Choose Import and select the download file (Category amounts over time.grm )
  5. Choose Close
  6. In the left pane choose Reports > Category amounts over time

Re: Monthly category report with selectable categories and time range?

Posted: Thu Apr 28, 2022 8:10 am
by DavidGreen
Thanks dbolton!

Please is there a way to make the following improvements?:
  • ability to select by sub category as well
  • remember Category/sub-category selection when date Period changes (currently reverts to 1st category!)
  • report the average value over the selected period
  • tabulate data under the chart
D Green

Re: Monthly category report with selectable categories and time range?

Posted: Fri Apr 29, 2022 1:56 am
by dbolton
I understand the want for subcategories. I want it myself, but omitted it to begin with (to simplify making the report).

I don't know a way to remember the category selection using the built-in date selection (It reloads the whole page from scratch using new data each time you select a period). Out of curiosity, what do you use the period selection for? I tend to pick "Over Time" and not change it after that.

Also it would be helpful to understand how you would use the data table. The chart does show the exact numbers if you hover. Are you looking for a table that matches the category you select and shows the same data as the chart (plus maybe the averages)?

Re: Monthly category report with selectable categories and time range?

Posted: Fri Apr 29, 2022 8:41 am
by DavidGreen
dbolton wrote: Fri Apr 29, 2022 1:56 am Out of curiosity, what do you use the period selection for? I tend to pick "Over Time" and not change it after that.
At the end of each month I want to see what our spending has been in category 'Food' subcat 'Grocery shopping' over 'Last 90 days' say, so that I can see how we've done against previous months.
dbolton wrote: Fri Apr 29, 2022 1:56 amAlso it would be helpful to understand how you would use the data table. The chart does show the exact numbers if you hover. Are you looking for a table that matches the category you select and shows the same data as the chart (plus maybe the averages)?
I'm trying to easily read each month's values. A table showing each month's value would help, or annotation on the chart itself. Yes - I'd expect data only for the cat/sub-cat I've selected. The average value (plus a line on the graph!) would be helpful.

For inspiration, the Homebank application handles this reporting pretty neatly, although average only shown with cumulative data:
1.png
1.png (48.12 KiB) Viewed 10056 times
2.png
2.png (52.79 KiB) Viewed 10056 times
3.png
3.png (54.98 KiB) Viewed 10056 times

Re: Monthly category report with selectable categories and time range?

Posted: Fri Apr 29, 2022 10:39 am
by Nikolay
Have you already looked at the budget reports?