Skip to Content
0

XSDS/JavaScript - aggregate count

Feb 03, 2017 at 08:13 AM

34

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers