I’ve got a database of stores with product prices and I’d like to allow a user to use a dropdown menu to present only 2 of the products to display information on (there are many products). Then in a separate text on the page (or part of a table does not matter) make a sum calculation of all the displayed product prices for each store. I’ve included a picture below of theoretically what it would look like in Excel. I’m not too picky if the data is displayed horizontally or vertically.
I’ve tried exploring this via a table that filters via dropdown selection but can’t figure out how to implement summing only present cells on the page, so I’ve thought of just adding multiple separate ‘text’ boxes on the page and having these text boxes update (linked to the collection) based on dropdown selection,
For example, a user on dropdown 1 chooses Apples and dropdown 2 chooses corn and therefore only the apples/corn info would display like the below.
My question would be how do I have a text box connect to a database location that is dependent on a dropdown choice, but the dropdown choice text does not equal the text box result. I.e Apples chosen on dropdown 1 and then text box displays 7.28 infront of storeA.
If anyone has a better approach I’m all ears, perhaps it would be easier with repeaters?