Need help!!!
I have a table that I need to create a total across a row instead of the typical summing the values of a column. Basically what I want to do is add a two new fields to the table for each row - one called "Total" and one called "MaxTotal".
So in each row I have 50 Criteria - Criteria1, Criteria2...Criteria50. These range in value from 0-2, though some of these will be null, and so I need to set the null values to zero, but only to get the "Total" field - when I open the form I don't want the null values populated. The null values are extremely important to get the "MaxTotal" field because they should not be counted.
So let's say this is one record, and lets say that there are really only 5 Criteria
Field Value
Criteria1 2
Criteria2 0
Criteria3 NULL
Criteria4 2
Criteria5 1
Then I want a Total field which basically says:
Criteria1+Criteria2+Criteria3+Criteria4+Criteria5, Which would be 2+0+0+2+1 = 5 (The second 0 is in place of the null value).
Total 5
Then, after I get the total field, I want a field to count all of the Criteria fields that were populated with non-null values, called "MaxTotal". So in the example above, MaxTotal = 8 (Because Criteria1, Criteria2, Criteria4 and Criteria5 are all populated and not Null, and the Max value that could be in each of those is 2, so 2*4 = 8)
MaxTotal 8
When I finally get these two values, then I can easily calculate a TotalPercentage by doing Total/MaxTotal.
Thanks!
I have a table that I need to create a total across a row instead of the typical summing the values of a column. Basically what I want to do is add a two new fields to the table for each row - one called "Total" and one called "MaxTotal".
So in each row I have 50 Criteria - Criteria1, Criteria2...Criteria50. These range in value from 0-2, though some of these will be null, and so I need to set the null values to zero, but only to get the "Total" field - when I open the form I don't want the null values populated. The null values are extremely important to get the "MaxTotal" field because they should not be counted.
So let's say this is one record, and lets say that there are really only 5 Criteria
Field Value
Criteria1 2
Criteria2 0
Criteria3 NULL
Criteria4 2
Criteria5 1
Then I want a Total field which basically says:
Criteria1+Criteria2+Criteria3+Criteria4+Criteria5, Which would be 2+0+0+2+1 = 5 (The second 0 is in place of the null value).
Total 5
Then, after I get the total field, I want a field to count all of the Criteria fields that were populated with non-null values, called "MaxTotal". So in the example above, MaxTotal = 8 (Because Criteria1, Criteria2, Criteria4 and Criteria5 are all populated and not Null, and the Max value that could be in each of those is 2, so 2*4 = 8)
MaxTotal 8
When I finally get these two values, then I can easily calculate a TotalPercentage by doing Total/MaxTotal.
Thanks!