My goal is a bar chart where X-axis is months, Y-axis is income.
I have a table with projects, where each project has an invoice sum and payment date which I reformat to look like ‘Month Year’, so January 2024 etc. But it’s still a date column so that Coda can sort those months correctly in the bar chart.
This works great for one-off payments.
But we also have recurring payments, where the invoice sum should be repeated every month. So, the invoice sum should be added to multiple months and bars in the chart, not just one month. This means I need to select multiple months in 1 cell — but this isn’t possible with a date column!
I’ve tried turning it into a text formula column with a list of months, but then they’re sorted incorrectly in the chart - alphabetically.
I think you might need to approach this a bit differently, and I have a question about your use case.
First, is this bar chart intended to compile data from all projects, or should each project have its own separate bar chart? In either case, I’d recommend structuring your document a little differently.
Separate your tables into two:
Project Table – This will contain the project title and other related information, including a column for payments linked to each project. This column will be a relationship to the Payment table.
Payment Table – This table will include a column related to the Project table, as well as columns for the payment date and amount. Each row represents an individual payment, covering all payments across projects and months. This setup allows you to create views and charts with ease, enabling filtering by project, date, and more.
For chart options, you can group rows by date and sum the values, providing a clear overview by project or time period.
Let me know if this approach would resolve your issue. I can’t create a demo document at the moment, but if this seems like a good solution, I’d be happy to put one together later.
Hi @Felipe_Arnhold thank you SO much for your advice and for writing it so clearly! I restructured it this way and it works great! Issue fully resolved