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
Monthly category report with selectable categories and time range?
With cost of living increases, I'd like to monitor the trend of all my monthly spending in specific categories (like food), and see a chart over the past 6 or 12 months, say. Please can you suggest a report which allows me to select one or more categories to report, and the time period?
The closest I can find is the Monthly Categories report but its chart amalgamates all categories over the last 12 months, and shows data for every category.
The Monthly Income vs Expenses report contains exactly the Period and date selector I need, but has no category filter.
I have no experience of coding SQL and have not found anything similar to what I need in https://github.com/moneymanagerex/general-reports. When I have imported the CategoryTrend report, I don't even understand how to update category and subcategory!
The closest I can find is the Monthly Categories report but its chart amalgamates all categories over the last 12 months, and shows data for every category.
The Monthly Income vs Expenses report contains exactly the Period and date selector I need, but has no category filter.
I have no experience of coding SQL and have not found anything similar to what I need in https://github.com/moneymanagerex/general-reports. When I have imported the CategoryTrend report, I don't even understand how to update category and subcategory!
Re: Monthly category report with selectable categories and time range?
The CategoryTrend report sounds like what you are looking for. It is set up to show Food:Groceries initially. Is that part working for you?
Although it isn't ideal, you can get different categories by editing one line of the SQL. Here's instructions to edit the category and subcategory.
Although it isn't ideal, you can get different categories by editing one line of the SQL. Here's instructions to edit the category and subcategory.
- From the main menu, select Tools > General Report Manager.
- In the left pane, select Category-CategoryTrend.
- In the right pane, select the SQL tab.
- On line 35, replace the word 'Food' with the category you want to track: WHERE cat.CATEGNAME = 'Food'
- On line 35, replace the word 'Groceries' with the subcategory you want to track (or delete the second part, from 'AND' on, if you don't want to limit to a single subcategory): AND subcat.SUBCATEGNAME = 'Groceries'
- Select Save.
- Select Run.
-
- 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 for your clear instructions. After editing line 35 as you explain I can generate a Category Trend Report.
Is there any way to add a Period and date selector like I see in the Monthly Income vs Expenses report?
David Green
Is there any way to add a Period and date selector like I see in the Monthly Income vs Expenses report?
David Green
- Renato
- MVP MMEX User
- Posts: 478
- 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?
Probably this would be the solution: https://github.com/moneymanagerex/money ... ssues/4282
regards Renato use MMEX since 2009, now with Windows 11
Re: Monthly category report with selectable categories and time range?
You could insert the following lines immediately after line 35 of the SQL tab:
The selectable date range doesn't work in the Report Manager but if you Save and Close the manger then go to the report in the main window it shows a date range drop-down menu at the top.
Code: Select all
AND TRANSDATE >= '&begin_date'
AND TRANSDATE <= '&end_date'
-
- 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?
Thank you dbolton.
Is there something similar I can do to add a category filter/selector?
D Green
Is there something similar I can do to add a category filter/selector?
D Green
-
- 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?
Before I add these lines the report generates a bar chart and data table, but after adding the lines the chart disappears and the data is empty.dbolton wrote: ↑Tue Apr 12, 2022 8:27 pm You could insert the following lines immediately after line 35 of the SQL tab:
The selectable date range doesn't work in the Report Manager but if you Save and Close the manger then go to the report in the main window it shows a date range drop-down menu at the top.Code: Select all
AND TRANSDATE >= '&begin_date' AND TRANSDATE <= '&end_date'
-
- 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?
Could you run the report from the Navigation tree?
-
- 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?
This is the output from the Navigation tree.
- Renato
- MVP MMEX User
- Posts: 478
- 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?
for me it works with these lines:
.
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;
.
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