Thank you @Piantu! Looks great, however it does not seem to solve my issue.
Your Groupby comes after the SpatialJoin, however Spatial Join in ArcGIS does the calculation during the Join. So an example.
I have different sites of shops. For a certain area around these shops I’d like to calculate the revenue.
With your example I’d have to do it after the join, however during the join these numbers need to be calculate, as later on it is not possible to take the distances into account.