GIDATS4978
Registered User.
- Local time
- Today, 12:32
- Joined
- Mar 8, 2016
- Messages
- 10
I tried searching the forums for this but can't seem to find it.
I have a table that has data as a text field. The data will be Numeric, Null or "N/O" as being "Non-Observed".
My query expression works if the data type is numeric (without the "N/O"'s). However, I can't seem to figure out how to get the expression to work if it is a text field (to include "N/O" as an option).
Here's my expression from a numeric field which works great:
(Nz([FieldA],0)+Nz([FieldB],0))/((IIf(Nz([FieldA],0)>0,1,0))+(IIf(Nz([FieldB],0)>0,1,0)))
As soon as I convert the data type to text the expression returns an error.
Is there a way I can convert all of the "N/O"'s to 0's and then the expression might work?
Or will expressions not work if it is a text data type?
Should I replace all the "N/O"'s to 99 or another random number and then exclude them in my expression (numeric data type) to get the correct results?
Thanks for the help.
I have a table that has data as a text field. The data will be Numeric, Null or "N/O" as being "Non-Observed".
My query expression works if the data type is numeric (without the "N/O"'s). However, I can't seem to figure out how to get the expression to work if it is a text field (to include "N/O" as an option).
Here's my expression from a numeric field which works great:
(Nz([FieldA],0)+Nz([FieldB],0))/((IIf(Nz([FieldA],0)>0,1,0))+(IIf(Nz([FieldB],0)>0,1,0)))
As soon as I convert the data type to text the expression returns an error.
Is there a way I can convert all of the "N/O"'s to 0's and then the expression might work?
Or will expressions not work if it is a text data type?
Should I replace all the "N/O"'s to 99 or another random number and then exclude them in my expression (numeric data type) to get the correct results?
Thanks for the help.