Hello @amico, is this an issue you are still looking to resolve? I tested on my end, and I think the way to get the value you would want be to nest an avgOver function inside of a sumOver function. Try something like this:
sumOver(avgOver({number_of_nights_for_travel}, [{travel_id}], PRE_AGG), [{company_id}], PRE_AGG)
I’ll mark this as a solution for now, but if you still have trouble getting your desired output or used a different function to make this work, please let me know!