Subject: Now I have a new issue…How do I omit certain values
Okay I’ve figured out how to get the average, but I’m running into an issue. Some documents either have a blank entry or an N/A on it. Of course this will cause problems adding the numbers up. How to I omit these documents if the field contains N/A or “”
I tried: @If(@IsError(r) | r = “” | r = “N/A”; r := 0; r);
But that just makes the whole thing as a value of 0. I tried this as well:
Subject: Found the Solution… (average for survey docs)
Okay I got it working.
I edited the view to make blank any entries that have a “N/A” in it.
On the field which does the computing I did a @Trim to the DBLookup, which omitted the blank entries
and that worked!
Could anyone please help by expanding upon this solution? I have a similar situation, but I’m trying to caluculate all fields contained in a document, but I too need to exclude fields with “N/A” - any additional help is appreciated
It sounds like you have a separate document for each survey. You want to display the average on “a form,” and I’m assuming it’s not the same form as is used for the surveys. I’m not sure what this “r” is that you’re using in your formula. You seem to be assuming that it will contain a list of all John’s scores, and if it does, this formula should in fact calculate the average.
But why you think r will contain a list of a particular person’s scores? You would have to arrange for this to happen, for instance by using @DbLookup to pull in the list from a view, using John’s name as a key.
There are no spooky connections between documents that just happen to have the same data value in a certain field. Notes has no way to know which field is an identifier. You have to build your own connections.
The r represents the DBLookup. It’s gathering the values from the column number for every document for a specific person. I have no problems adding the values of that column, but I’m trying to achieve the average of that value.