Hi Everyone, I’m Dheeraj Sudan and my wife Meenu Hinduja, run a business. I’m trying to create a chart in my Knack app that shows data from two different tables, but I’m not sure how to set it up. I’ve tried linking the tables and creating a view, but the chart doesn’t display the data correctly.
Has anyone done something like this before? I’d really appreciate any tips, suggestions, or examples of how to make it work.
Hi @dheerajsudan, to display data from two different tables in a chart, you’ll need to utilise text formulas or equation fields if the fields you want to display are not the display field of the connected table.
This is because Knack doesn’t have a way of selecting connected table field values to display as chart axes or aggregation values.
This is one of those Knack workarounds that everyone hits eventually. Since charts usually pull from a single source object, the most reliable way I’ve found is to use a separate ‘Summary’ object to roll up the totals from both tables via equations or formulas.
It takes a bit more setup on the data side, but it’s much cleaner than trying to force two unconnected data sources into one view. Are you planning to keep the data live, or is this more for a static monthly report?
You can build sophisticated reports that combine data from multiple tables using custom JS and CSS.
For simple reports, you’re limited to text formulas or equation fields; however, note that the more of these fields you add to your objects, the more they will slow down your Knack app.
If you have an example of the kind of report you’re trying to create, please post it here, or feel free to send me a direct message.