Hi,

how can i show the aggregate (sum ) of a column of all rows of the table in a text below the table or if i can add aggregate row as the last row of the table ?

Hi,

how can i show the aggregate (sum ) of a column of all rows of the table in a text below the table or if i can add aggregate row as the last row of the table ?

Hello @codenayak

Don't know about having a total row in table component, but to calc the total of a column, I'd use: `{{_.sum(table1.displayedData.map(d => d.DieselCash))}}`

and using `displayedData`

makes the total updated to the table filter state.

You can use `data`

but you need to convert as Array first using `formatDataAsArray`

.

Hope this help

1 Like

@abusedmedia

thanks, it works.

i have another problem the sum of values are in string format so sum is concateneting the values instead of summation in number format , how do i solve this.

@codenayak it looks like your numbers are strings.

Prepend `+`

for a fast type coercion, so in your case `+d.DieselCash`