SteveB Posted September 1, 2006 Posted September 1, 2006 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
Ender Posted September 1, 2006 Posted September 1, 2006 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.
Ugo DI LUCA Posted September 2, 2006 Posted September 2, 2006 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
Recommended Posts
This topic is 6715 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now