Hi folks,
I have a table of lab results, and I need to either add a calculated field in the table or else generate a query which includes a calculated field.
The lab results contain numbers (to 2 decimal places), and values which could not be accurately measured as they are below detection limit. The latter are all recorded as just being below the detection limit, so the record reads <0.05. For example I could have something like this:
Sample1 0.5
Sample2 0.4
Sample3 <0.05
Sample4 0.08
In this case, all samples that are below detection limit will be recorded as <0.05.
I need to output this table as a csv, to be used in another programme. I want to replace all of the values given as <0.05 as 0.025 (i.e. half of the detection limit - it is standard practice to do this as the programme I need to use the data in cannot cope with non-numeric values).
I don't want to export to excel and carry out a find/replace as I will be getting new results all the time, and there is always a danger of a mistake or data being transposed.
What I need is to create a new field (field B), whereby if the original field (field A) contains <0.05, it is replaced with 0.025, otherwise it simply returns the value contained in field A. As I said, the field could be a new field in the table, or could be a field created in a query.
I don't have any experience with writing code, so I'm afraid you will need to treat me as a complete novice.
Many thanks for your help (I hope).
I have a table of lab results, and I need to either add a calculated field in the table or else generate a query which includes a calculated field.
The lab results contain numbers (to 2 decimal places), and values which could not be accurately measured as they are below detection limit. The latter are all recorded as just being below the detection limit, so the record reads <0.05. For example I could have something like this:
Sample1 0.5
Sample2 0.4
Sample3 <0.05
Sample4 0.08
In this case, all samples that are below detection limit will be recorded as <0.05.
I need to output this table as a csv, to be used in another programme. I want to replace all of the values given as <0.05 as 0.025 (i.e. half of the detection limit - it is standard practice to do this as the programme I need to use the data in cannot cope with non-numeric values).
I don't want to export to excel and carry out a find/replace as I will be getting new results all the time, and there is always a danger of a mistake or data being transposed.
What I need is to create a new field (field B), whereby if the original field (field A) contains <0.05, it is replaced with 0.025, otherwise it simply returns the value contained in field A. As I said, the field could be a new field in the table, or could be a field created in a query.
I don't have any experience with writing code, so I'm afraid you will need to treat me as a complete novice.
Many thanks for your help (I hope).
Last edited: