Pre-Existing Value and Aggreated Function


Base on the below code: both Price Quantity will be “Sum”, I assume this is by default. How to I change the default say into Count or Average?

  rows: [{uniqueName: 'Color'}],
  columns: [{uniqueName: '[Measures]'}],
  measures: [{uniqueName: 'Price'}, {uniqueName: 'Quantity'}],

1 answer

Iryna Kulchytska Flexmonster February 4, 2016

Hi David,
Thank you for posting your question. I saw you already answered it in the previous thread. I decided to add your answer here as well.
To change the default aggregation for the measure to Count or Average, please use aggregation property, as follows:

measures: [{uniqueName: 'Price', aggregation:'Count'}, { uniqueName:...

Kind regards,

Please login or Register to Submit Answer