I am trying to get some aggregated data from an OData endpoint V4 but before aggregating it I want to apply some filters. Here I have tried to set up the parameters separately but the aggregation is made for entire set of data
Products?$filter=(Category eq "Beverage")&$apply=aggregate(cost with sum as TotalCost)
However, I also tryed to put the filter in the $apply attribute as suggested in StackOverflow Question
Products?$apply=filter(Category eq "Beverage")\aggregate(cost with sum as TotalCost)
but I am getting the following error:
Cannot parse 'filter' in apply