In order to nest aggregation functions, you need to use "Advanced Aggregation" with function "Aggr". You also need to determine, at what level of detail do you want the "internal" aggregation to happen - i.e. you are comparing RTT with the average of PTT - at what level?
You expression should look like the following:
Avg( aggr( if(RTT<Avg(PTT)-1,RTT), <Dimension1, Dimension2...>) )
I have reviewed this function Aggr(), but the result isn't correct
becuase i don't know what is the level detail
i think that is ID of the Transit Time, but the result isn't correct
the fields RTT and PTT depending of Filters and Selecctions.
for example: if is selected a Port Origin or Port Destination or Country or Dates or others
the Averages must be with the values posibles
when everything is defined correctly, it should work. Function aggr() takes in account your selections.
You need to answer this question: "Avg(PTT)" - for what Entity? Average by Port? or Country? If you are after the overall average (for anything selected/associated), than the approach with the variable (suggested above) would work even better.