riverwatch
New member
- Local time
- Today, 15:57
- Joined
- Jan 11, 2016
- Messages
- 5
Hello,
I have a database used to manage volunteer water quality data. For example, I have a table with 20 years of water quality data. An example water quality record has [FieldDate] and [WaterQualityValue]. I would like to run a query that calculates the the number of records that are less than each record for its corresponding year. For example: I have 3,500 records from 1995-2015, and can easily count the number of records less than each record by using
DCount("*","WaterQualityTable","WaterQualityValue<" & [WaterQualityValue])
However, this returns all the records across all years that are less than that specific record's water quality value. So how can I make the query count only records that are less than each [WaterQualityValue] for that [WaterQualityValue]'s [FieldDate] year?
For example, a record with a [FieldDate] of 05/14/2010 and [WaterQualityValue] of 15 would need to count records from 2010 only with a [WaterQualityValue] of less than 15.
Thanks!
Matt
I have a database used to manage volunteer water quality data. For example, I have a table with 20 years of water quality data. An example water quality record has [FieldDate] and [WaterQualityValue]. I would like to run a query that calculates the the number of records that are less than each record for its corresponding year. For example: I have 3,500 records from 1995-2015, and can easily count the number of records less than each record by using
DCount("*","WaterQualityTable","WaterQualityValue<" & [WaterQualityValue])
However, this returns all the records across all years that are less than that specific record's water quality value. So how can I make the query count only records that are less than each [WaterQualityValue] for that [WaterQualityValue]'s [FieldDate] year?
For example, a record with a [FieldDate] of 05/14/2010 and [WaterQualityValue] of 15 would need to count records from 2010 only with a [WaterQualityValue] of less than 15.
Thanks!
Matt