I have a table that i get values from a query,
I would want to get the total sum for every row.
I have try using if statements something like 

```
 <cfif ECA GTE 0><td align="center">#ECA#</td>  <cfset totaleca+=ECA></CFIF>

```

but i dont get the correct sum.
How would I get the sum for all the columns?

I made a <http://jsfiddle.net/w2k3y3kz/2/> 

CODE: 

```
<table id="table-example-1"><caption>testing</caption>
   <thead><tr>
       <th colspan="1"></th>
       <th colspan="3">ECA</th>

    </tr><tr>

       <th></th>
       <th>open</th>

        </tr></thead>

<cfoutput query="getSubtotal">
    <cfset totaleca = 0>
<cfset totalsum = 0>
     </tr></thead><tbody><tr><td style="width:70px"; align="center">#numberformat(mid(getSubtotal.oaoperiod,5,2))#/#left(getSubtotal.oaoperiod,4)#  </td>
   <td align="center">#ECA#</td> 
     <td align="center">#ECAClose#</td> 
     <td align="center">#ECAcos#</td>   
    <td align="center">#NSA#</td>   
     <td align="center">#NSAClose#</td> 

    </tr>
    </tbody>

    </cfoutput>
    <cfoutput>
        <tfoot>

    <tr>
     <td></td>

    </tr>

      </cfoutput>
        </tfoot>
    </table>

```