DataSetIntervalIndex intervalIdx = intervalIdxs.get(i);
result.setValueAt(i, 0, intervalIdx.getName());
// Add the aggregate calculations.
for (int j=0; j< groupFunctions.size(); j++) {
GroupFunction groupFunction = groupFunctions.get(j);
DataColumn dataColumn = dataSet.getColumnById(groupFunction.getSourceId());
if (dataColumn == null) dataColumn = dataSet.getColumnByIndex(0);
Double aggValue = _calculateFunction(dataColumn, groupFunction.getFunction(), intervalIdx);
result.setValueAt(i, j + 1, aggValue);
}
}
return result;
}