How to calculate with summarize

I have 3 tables

  • Products
  • Inventory (FK to Products and a Quantity column)
  • Sold Items (FK to Products and columns for Order ID and Quantity Sold)

I want to show a table of Products with a calculated column to show Total Sold Quantity / Inventory to give me a calculation of sales rate. For me this doesn't work because I need to sum the count of sold items for each product. How should I do this?

Do I need to use models or series?

why don't you try doing this on several queries and then you join all of those based on the product id?

e.g. first question:

  • total sold per id

second question

  • total inventory per id

third question
join the first one with the second one, create a custom column that does the ratio

1 Like

Ah! I didn't know I could use saved questions, that is exactly what I was looking for. Thank you!

It would be cool if I could use columns from the question which aren't shown in the results of the question (for example, id isn't shown in the Total Sold table as the product names better), but I guess I can create a separate question if needed. Are there any other workarounds to use the data not shown in the question I am including?