Hello support team,
There is a problem (1.png).
Maybe, this happened when tried to get an average count of empty string.
I tried to recreate this problem, but when I want to set aggregation "sum", I see "count": https://jsfiddle.net/qgxr9ukc/15/
Thanks for your help.
Best regard,
Artsem
Hello,
Thank you for reaching out to us.
In such cases, component behavior requires defining the type of the fields. If there is no data for some measures in your dataset, Flexmonster defines them as string values. Sum and average aggregations are not supported for non-numeric fields. Therefore, it displays count aggregation. The proper way of defining the field's data type is using mapping. For example,
mapping: {
"Quantity": {
type: "number",
caption: 'Quantity',
aggregations: ['sum', 'count', 'distinctcount'],
},
"Price": {
type: "number",
caption: 'Price',
aggregations: ['sum', 'count', 'distinctcount'],
},
},
Kindly check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/oqmzn73k/4/
Please let us know if it works for you. Feel free to contact us if other questions arise.
Kind regards,
Nadia
Hello, Artsem,
Hope you are doing well.
We were wondering if you had a chance to test a suggested approach.
Looking forward to hearing your feedback.
Kind regards,
Nadia