I have a website where users have the ability to enter the sales data of pieces of art. Each piece of art has many sales prices. I want to be able to calculate the average selling prices of each piece of art. I want to display the high price, the low price, and the average price of each piece of art.

Right now I have two content types, artwork, and prices. What would be the best way to approach calculating some basic information such as the average price for each piece of art? Should I have a new content type for calculations, or add computed fields for the prices content type? How do I ensure that prices and averages are recalculated each time a user enters a new sales price? Just some basic pointers on setup would be fantastic! Thanks!

Comments

sammyman’s picture

bump

gdoteof’s picture

I don't think you should have two content types.. the price should be part of the artwork content type I imagine.. or are you talking about fields and not content types?

sammyman’s picture

No, they are actually two different content types. This was crucial because I needed the users to be able to enter multiple sales information for each piece of art (ebay sales etc). They are connected with a node reference field, so each piece of art can display the correct sales data.

mmjvb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)