---
title: "silreporting_sumTable"
canonical: "https://support.appfire.com/space/PSJ/15481950/silreporting_sumTable"
format: markdown
---
> Macro (aura-html)


## Syntax

**<span style="color: #3366ff">silreporting_sumTable(silTable)</span>**

## Description

> Macro (excerpt)
> 
> Calculates the sum per columns for a provided table.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| silTabel | SILReportingTable | Yes | The table. |

## Return type

**SILReportingTable**

The table with the sum calculated in the footer.

## Example

In the fallowing example you can see the sum per columns for a table which contains the number of opened and resolved issues for a list of projects.

```
string [] projects = "TEST|FIBR|STEI|GRBI|HGES|RGIS";
string [] resolvedIssues;
string [] openedIssues;
for(string p in projects) {
    resolvedIssues[p] += countIssues("project = " + p  + " AND status in (Done, Closed, Resolved)");
    openedIssues[p] += countIssues("project = " + p  + " AND status not in (Done, Closed, Resolved)");
}
    
SILReportingHeader [] headers;

SILReportingHeader h1;
h1.name = "Opened Issues";
h1.sortable = "sortable";
headers += h1;
    
SILReportingHeader h2;
h2.name = "Resolved Issues";
h2.sortable = "sortable";
headers += h2;

string [][] rows;
for(string p in projects){
    rows += {openedIssues[p], resolvedIssues[p]};
}

SILReportingTable table;
table.headers = headers;
table.rows = rows;

return silreporting_sumTable(table);
```

![image](media://34471d51-bdf4-4b3e-9124-72616c50631d)