Expenses vs. Day of Week
Shows a piechart with the total expenses for each day of the week
A pie chart of the expenses between two dates by the weekday they fell on. Use it to see whether you spend more at
weekends. reports.weekStart in the Configuration decides which day the week starts on. In GnuCash: Reports ▸
Examples ▸ Expenses vs. Day of Week.
The options that matter are Accounts/Accounts, General/Start Date and End Date and Accounts/Include Sub-Accounts.
Examples
Example: with a copy of the reports/category-multi example book open as book.gnucash, at 2024-03-15T12:00:00Z.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"report.run","params":{"report":"Expenses vs. Day of Week","options":{"Accounts":{"Accounts":["a0000000000000000000000000000001"]},"General":{"Start Date":{"absolute":"2024-03-01"},"End Date":{"absolute":"2024-03-31"}}}}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"title": "Expenses vs. Day of Week",
"sections": [
{
"blocks": [
{
"kind": "chart",
"type": "pie",
"title": [
"Expenses vs. Day of Week",
"03/01/24 to 03/31/24: $3,472.00"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
}
Command line
red-ale exec --book book.gnucash report.run '{"report":"Expenses vs. Day of Week","options":{"Accounts":{"Accounts":["a0000000000000000000000000000001"]},"General":{"Start Date":{"absolute":"2024-03-01"},"End Date":{"absolute":"2024-03-31"}}}}'
It prints:
{
"title": "Expenses vs. Day of Week",
"sections": [
{
"blocks": [
{
"kind": "chart",
"type": "pie",
"title": [
"Expenses vs. Day of Week",
"03/01/24 to 03/31/24: $3,472.00"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
MCP tool call
Tool call:
{"name":"report.run","arguments":{"report":"Expenses vs. Day of Week","options":{"Accounts":{"Accounts":["a0000000000000000000000000000001"]},"General":{"Start Date":{"absolute":"2024-03-01"},"End Date":{"absolute":"2024-03-31"}}}}}
Result:
{
"structuredContent": {
"title": "Expenses vs. Day of Week",
"sections": [
{
"blocks": [
{
"kind": "chart",
"type": "pie",
"title": [
"Expenses vs. Day of Week",
"03/01/24 to 03/31/24: $3,472.00"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
}
Template GUID: dde49fed4ca940959ae7d01b72742530 · Script: example/daily-reports.rhai
Options
Accounts
- Include Sub-Accounts (boolean, default
true): Include sub-accounts of all selected accounts. - Accounts (accountList, default
[]): Report on these accounts, if chosen account level allows.
Display
- Show Totals (boolean, default
true): Show the total balance in legend? - Plot Width (plotSize, default
{"percent":100}): Width of plot, 10 - 100 in percent, above in pixels. - Plot Height (plotSize, default
{"percent":100}): Height of plot, 10 - 100 in percent, above in pixels.
General
- Report name (string, default
"Expenses vs. Day of Week"): Enter a descriptive name for this report. - Stylesheet (multichoice, default
"Default"): Select a stylesheet for the report. - Add options summary (multichoice, default
"never"): Add summary of options. - Start Date (date, default
{"relative":"start-accounting-period"}): Start of reporting period. - End Date (date, default
{"relative":"end-accounting-period"}): End of reporting period. - Report's currency (currency, default
"CURRENCY::USD"): Select the currency to display the values of this report in. - Price Source (multichoice, default
"weighted-average"): The source of price information.