Skip to main content

I am outputting many rows to an excel table, some of my columns are numeric, I am hoping to add a total row at the bottom of my table, to sum these columns. I have found the Statistics Calculator, but I have no idea how to apply it (if at all possible).

 

Any thoughts?

Hi @benvk, I would use the Aggregator with the Attributes to Sum option to do that. See the screenshot below. Assuming attr1, attr2, attr3 has numeric values.


@benvk For FME 2020 we revamped the StatisticsCalculator to make it faster and easier to use. So that is now a good alternative to the Aggregator.


Another option is to let Excel do the work by writing a SUM formula after your data. I've written a blog post about how to do this here.

To make this dynamic I like to use this formula:

=SUM(INDIRECT(ADDRESS(1,COLUMN())&":"&ADDRESS(ROW()-1,COLUMN())))

or if there is a header sell then

=SUM(INDIRECT(ADDRESS(2,COLUMN())&":"&ADDRESS(ROW()-1,COLUMN())))

 


@benvk For FME 2020 we revamped the StatisticsCalculator to make it faster and easier to use. So that is now a good alternative to the Aggregator.

I can see the results in the statistics calculator, they look correct. I still am perplexed how to get FME to insert a row in the sheet to show these totals?


Reply