Skip to Content

XSDS/JavaScript - aggregate count

Hello Friends

i am using XSDS services, to do some aggregations on the set of columns.

Below is the code, i am using to get the aggregation total count, for a specific groupby condition. I am initally, getting all the records with the filter condition, then based on the groupby column, i am getting the count for each distinct value of that group by column.

allRecords.filter(function(r){ return r[groupByCondition.column] == groupByCondition.value; }).length;

This works pretty well, if the groupbyColumn is having a numeric value. But it is not getting the aggregate total count, when the group by column is having characters.

Any help, on this would be appreciated.

Regards

Giri

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers