gary.newport
Registered User.
- Local time
- Today, 14:56
- Joined
- Oct 14, 2009
- Messages
- 79
I have a field called criteria_id that can have a series of values but fall into one of three groups: Px, Mz and Dy where x, y and z are numbers from 1 to a given value.
I would like to create a query that counts the number of "Px", "Mz" and "Dy" - regardless of value (so, if I have P1, P2, P3 and P4 I want the count to return 4).
I would then, ideally in the same expression, compare the results of this calculation against three other fields in the query (no_pass, no_merit and no_dist) and return PASS, MERIT, DISTINCTION depending upon the result of the comparison, or BELOW PASS if there is no acceptable comparison.
So, the system says that no_pass=8, no_merit=3 and no_dist=2. If the result of the number of Px = 8 but the others are below the required value then PASS, if Px=8 and Mz=3 then MERIT and Px=8, Mz=3, Dy=2 then DISTINCTION.
They MUST have Px=8 before Mz can be considered. They must have Mz=3 before Dy can be considered. If Px<8 then BELOW PASS.
Am I asking too much from an expression? Should I be coding this instead?
I would like to create a query that counts the number of "Px", "Mz" and "Dy" - regardless of value (so, if I have P1, P2, P3 and P4 I want the count to return 4).
I would then, ideally in the same expression, compare the results of this calculation against three other fields in the query (no_pass, no_merit and no_dist) and return PASS, MERIT, DISTINCTION depending upon the result of the comparison, or BELOW PASS if there is no acceptable comparison.
So, the system says that no_pass=8, no_merit=3 and no_dist=2. If the result of the number of Px = 8 but the others are below the required value then PASS, if Px=8 and Mz=3 then MERIT and Px=8, Mz=3, Dy=2 then DISTINCTION.
They MUST have Px=8 before Mz can be considered. They must have Mz=3 before Dy can be considered. If Px<8 then BELOW PASS.
Am I asking too much from an expression? Should I be coding this instead?