0
I have a doubt on how to calculate values that are in column, I was able to calculate the values in line, however, in columns I am not able, the need is to create subtotals of each column I have if anyone has any idea or some example of how to do this thank you.
<table class="table table-striped" height="100%">
<thead>
<tr>
<th width="170px" class="fileName alignCenter"><label class="titLabel">Date Event</label></th>
<th width="170px" class="fileName alignCenter"><label class="titLabel">Event Type</label></th>
<th width="150px" class="alignCenter"><label class="titLabel"> RE1A</label></th>
<th width="150px" class="alignCenter"><label class="titLabel"> RE2A</label></th>
<th width="150px" class="alignCenter"><label class="titLabel"> RE3A</label></th>
<th width="150px" class="alignCenter"><label class="titLabel"> RE4A</label></th>
<th width="150px" class="alignCenter"><label class="titLabel"> RE5A</label></th>
<th width="150px" class="alignCenter"><label class="titLabel"> RE6A</label></th>
<th width="150px" class="alignCenter"><label class="titLabel"> RE7A</label></th>
<th width="150px" class="alignCenter"><label class="titLabel"> Total Event</label></th>
</tr>
</thead>
<tbody>
<tr id="no-results" ng-hide="{{noResults}}" ng-show="{{!noResults}}">
</tr>
<tr ng-repeat="output in result">
<td width="170px" class="alignCenter"><label> {{output.referenceDate | date:'dd/MM/yyyy'}}</label></td>
<td width="170px" class="alignCenter"><label> {{output.eventType}}</label></td>
<td width="170px" class="alignCenter"><label> {{output.re1A}}</label></td>
<td width="170px" class="alignCenter"><label> {{output.re2A}}</label></td>
<td width="170px" class="alignCenter"><label> {{output.re3A}}</label></td>
<td width="170px" class="alignCenter"><label> {{output.re4A}}</label></td>
<td width="170px" class="alignCenter"><label> {{output.re5A}}</label></td>
<td width="170px" class="alignCenter"><label> {{output.re6A}}</label></td>
<td width="170px" class="alignCenter"><label> {{output.re7A}}</label></td>
<td width="170px" class="alignCenter"><label> </label></td>
</tr>
<tr class="primary">
<td width="170px" class="alignCenter"><label>Total RE</label></td>
<td width="170px" class="alignCenter"><label> {{output.eventType}}</label></td>
</tr>
</tbody>
</table>
recalling that I need to add up the RE’S values
I understood but as I would do to sum all the values of Re1a for example, I say all the values that are in this column ?
– Wesley S
Ué, just put the variable you want to add into the function. Take a look at the code of the function and adapt to the attribute you want. In the example I are all, but if you want to add only one, just take the others
– Sorack