Update tableview.cpp

Change aggregate according to drop-down item chosen from the header in TableView.