Telegraf agrregator plugin

how to aggregate or manipulate data using aggregator plugin. For ex: i need to have a formula to calculate something and add new tag/field with that value