cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

services included data filter and aggregate function

Alexandrite

services included data filter and aggregate function

In my situation, I can do aggregate function and data filter function in different services. but now I want to combine these two in one service. how to do that? Could someone show me an example.

 

here is my code in service: 

var result = Resources["InfoTableFunctions"].RenameField({
t: Resources["InfoTableFunctions"].Aggregate({
t: me.QueryDataTableEntries({ maxItems: 1000000 }),
columns: 'value',
aggregates: 'SUM',
query: query,
groupByColumns: 'month'

}),
from: "SUM_value",
to: "value"
});

var query =
{
"filters": {
"type": "EQ",
"fieldName": "KPI_Details",
"value": "Volume1"
}
};

and result only show each month number and value