I’ve created a simple ordering application for a small beverage manufacturer using the most recent trebuchet method from Robert :https://www.youtube.com/watch?v=1QbKTccN850. Works great… My question is what’s the best method to create a metrics dashboard based on sales and in particular, based on products sold since the product info is consolidated within a JSON list within a single cell unrelated to the products table. I’ve posted the Orders screen below for reference… appreciate the help
So do you need justs the products sold, or do you have to group it by date?
Ideally both as the dashboard would be setup with timeframe filters. The date would come from the timestamp column as I didn’t include it in the JSON. if it’s easier to include direclty in the JSOn, I can add it no issue
My first thought is:
- Keeping the timestamp out of the JSON. You just need to keep it on the Order level.
- Create timeframe filters and use a query column to query the related orders.
- Join the OrderItems into a JSON array and use JavaScript to sum the sales for all unique items.
- Either transpose the resulting JSON into a helper table to feed Glide’s chart, or use Quickchart/Chart.js to deal with it.
2 follow up questions… and thanks for the much needed guidance.
- Novice at this at best so recommended prompt I could in chatgpt to help create said JS?
- how should I think about using this approach vs the more straight forward orders → orderitems with relations to accomplish the same thing?
This will be much more straightforward to create a dashboard chart.
Your approach saves rows, but it’s harder to aggregate data.
1 Like