I created a performance evaluation form that has multiple tables (6) (all have two columns with the last row/column of each table a total of possible points for that section).
At the end of the form I want to be able to count all the 2nd columns (not the totals) that are >0 and display that number.
Any help would be greatly appreciated.
Solved! Go to Solution.
You can get a count of number of cells with a value greater than zero with an expression like;
Table1.resolveNodes("Row1.[NumericField1 > 0]").length
This assumes the second column is called NumericField1, and the table is called Table1 and the row called Row1 ... so you will probably have to change those.
You could have six expressions like this one in the calculate event of the you total field and add them together.
I'm sure that would work but I couldn't get it to with my limited knowledge. However after poking around, I did get an if statement to calculate each table for me and then I used sum to add each to get to my total count. Probably the long way around but it works. Here's my next question if you can help.
I want to take the sum (Raw) and divide by the Count (Avail) to get a Score. I thought that was pretty simple but I get the following error using this. - but it still gives me the correct answer. I would like to get rid of this error box. Any help would be great.
form1.Subform9.Table7.Row4.Score::calculate - (FormCalc, client)
Score = Row2.Raw / Row3.Avail
it seems like one of those value are equal to 0.
You cannot divide a value by 0, so unless you make an if statement to make sure none of these values are equal to 0 you might get that message often.
Hope this help!
I tried the following but maybe I'm missing something. (both fields could be blank at some point until the user starts filling in the blanks.
I googled this to get rid of my zero division and I do get the calculation but I want to get rid of the error message.
Do I need another if statement? and how would I do that?
if(HasValue(Row2.RawCount&Row2.RawCount>0)) then (Row2.RawCount/Row3.Avail) else null endif