In Ember js, How to get the data by filtering and manipulate the values then store in a variable to use in template

Please help me with this ember issue, I am trying to get the data in my component from my db with multiple filters like kind, same value and I want to save the count with the same valued items then the related sum of weights.

Here is my model and I am using firebase database:

import DS from 'ember-data';

var attr = DS.attr;

export default DS.Model.extend({
    IN_OUT_FLAG: attr();
    ACTUAL_COMPLEX: attr(),
    DESTN_CITY: attr(),
    LOCATION: attr(),
    COMMODITY_CODE: attr(),
    UNITID: attr(),
    PRIORITY: attr(),
    WEIGHT: attr(),

});

I need to first check with in_out_flag “0” or “1”, if (0) then need to get the number units with same complex (ACTUAL_COMPLEX) and the sum of the weights (WEIGHT) of units belongs to the same complex. I need to display this kind of output: 07 PM