I am sending a request to the dynamics web API with the following parameters:
?$filter=_ownerid_value eq 'X'&$apply=groupby((activitytypecode),aggregate($count as count))
However I am getting the error
Unable to cast object of type 'Microsoft.Xrm.Sdk.AliasedValue' to type 'System.String'.
Could someone please help me construct a filter so that I can get the count of each activity type for the user?