Consolidation Function with Golang via C++

Consolidation function

Aspose.Cells can be used to apply ConsolidationFunction to data fields (or value fields) of pivot tables. In Microsoft Excel, you can right‑click the value field, select the Value Field Settings… option, and then choose the Summarize Values By tab. From there, you can select any ConsolidationFunction of your choice, such as Sum, Count, Average, Max, Min, Product, Distinct Count, etc.

Aspose.Cells provides ConsolidationFunction enumeration to support the following consolidation functions.

  • ConsolidationFunction::Average
  • ConsolidationFunction::Count
  • ConsolidationFunction::CountNums
  • ConsolidationFunction::DistinctCount
  • ConsolidationFunction::Max
  • ConsolidationFunction::Min
  • ConsolidationFunction::Product
  • ConsolidationFunction::StdDev
  • ConsolidationFunction::StdDevp
  • ConsolidationFunction::Sum
  • ConsolidationFunction::Var
  • ConsolidationFunction::Varp

Applying ConsolidationFunction to Data Fields of a Pivot Table

The following code applies the Average consolidation function to the first data field (or value field) and the DistinctCount consolidation function to the second data field (or value field).