September 1, 200619 yr I need to calculate the minimum and maximum selling price for a subdivision. Here's how the data is structured: Each 'FloorPlan' is a record which has, among other fields, a selling price. There are multiple Floor Plan records. Each record also has the key of its parent record, the subdivision. So I have a relationship between each subdivision and all its related Floor Plans. I know I can script the finding of the min and max but that isn't a great technique. How can I do it in 1 or more calcs (using FM8 Advanced)? Steve
September 1, 200619 yr You didn't say it, but I'm assuming you want to then show the min and max floor plan selling price in a Subdivision record/layout. You can add a calc for each in the Subdivision table, where: MaxFloorplanPrice (calculation, number result) = max(FloorPlan::Selling Price) and MinFloorplanPrice (calculation, number result) = min(FloorPlan::Selling Price) Or you can define two additional TOs of FloorPlan, one sorted by Selling Price ascending, and one sorted by Selling Price descending. Then just place the related Selling Price field from each relationship onto the Subdivision layout.
September 2, 200619 yr Hi, Or create a statistic field xxMax and XXMin in the expressions in the related FloorPlan Table. Then just drop it on the Layout whatever the sort is. HTH
Create an account or sign in to comment