those lines give me:
SQL logic error[1]: no such column: t1.STATUS
Monthly category report with selectable categories and time range?
Moderator: Renato
-
- New MMEX User
- Posts: 11
- Joined: Fri Jul 03, 2020 2:28 pm
- Are you a spam bot?: No
- Renato
- MVP MMEX User
- Posts: 480
- Joined: Mon Apr 25, 2011 7:36 pm
- Are you a spam bot?: No
- Location: near Zurich
Re: Monthly category report with selectable categories and time range?
.
this is my SQL Code:
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;
regards Renato use MMEX since 2009, now with Windows 11
Re: Monthly category report with selectable categories and time range?
I created a new report that lets you select the period and category.
Instructions
Instructions
- Download the attachment below (Category amounts over time.grm)
- Open Money Manager Ex
- From the main menu, choose Tools > General Report Manager
- Choose Import and select the download file (Category amounts over time.grm )
- Choose Close
- In the left pane choose Reports > Category amounts over time
- Attachments
-
- Category amounts over time.grm
- (2.68 KiB) Downloaded 147 times
-
- New MMEX User
- Posts: 11
- Joined: Fri Jul 03, 2020 2:28 pm
- Are you a spam bot?: No
Re: Monthly category report with selectable categories and time range?
Thanks dbolton!
Please is there a way to make the following improvements?:
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
Re: Monthly category report with selectable categories and time range?
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)?
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)?
-
- New MMEX User
- Posts: 11
- Joined: Fri Jul 03, 2020 2:28 pm
- Are you a spam bot?: No
Re: Monthly category report with selectable categories and time range?
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.
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:
-
- MMEX Developer
- Posts: 1535
- Joined: Sat Dec 06, 2008 2:27 pm
- Are you a spam bot?: No
- Location: Sankt-Petersburg, Russia
Re: Monthly category report with selectable categories and time range?
Have you already looked at the budget reports?