how i declare filter on my aggregation to take top 10 sum *** on my json file
Hello, Dror,
Thank you for contacting us.
You can define the filter in the Slice object of your report. For example,
"slice": {
"rows": [
{
"uniqueName": "Category",
"filter": {
"measure": {
"uniqueName": "Price",
"aggregation": "sum"
},
"query": {
"top": 10
}
}
}
]
},
More information you can find in our documentation: https://www.flexmonster.com/api/filter-object/
Kindly note that the easiest way to set necessary configurations is to edit your report directly from the UI. Then simply save the report using the Save tab on the toolbar. Now you can add this report to your code.
Alternatively, you may use setFilter API call. For example,
flexmonster.setFilter("Category", {
"measure": {
"uniqueName": "Price",
"aggregation": "sum"
},
"query": {
"top": 10
}
});
Please let us know if it works for you. Feel free to contact us if other questions arise.
Kind regards,
Nadia