LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to calculate the sum of the values of some columns of a table

Solved!
Go to solution
0 Kudos
Message 21 of 23
(664 Views)
Solution
Accepted by topic author achfire

I'm willing to bet that you put something in the third row.  Even if it was deleted, there will be an empty string.  And since arrays must be rectangular, if you added to row 2 anything, all of the colums will have something in there.  They will default to an empty string.  And when you convert an empty string to a number, you get 0 (whatever you specify as the default).  So the added 0s throw off your average.

 

So put in some code to filter out the empty strings to that they don't affect your average.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 22 of 23
(657 Views)

really thanks a lot P@Anand and for your precious help 😉

0 Kudos
Message 23 of 23
(646 Views)