9 Replies Latest reply on Nov 6, 2018 2:44 AM by Ciara Brennan

    Average Cost per Event

    David Gabra

      Hi

      How do I calculate the average cost of the an expense - based on the relation between the type of cost,  number of days and of course the cost.

       

      1- the avg costs is calculated where the schema name is anything but 'cancel or 'NA''- and the Travel expense type is ' Taxi' and the based on the Leg Days

      - so it would be for 1111 -   (12+12)/12 = 2  and for 222 it would be 34+12+56 /20  = 12.5  and so on

      - please do per trip - so trip should be fixed.

       

      2.     count the number of occurrences of each expense try, per trip, and put these on separate columns, ie. one for car and one for taxi,   [i have this in another post - but it did not work - so kindly asking again.

       

       

      Trip NumberSchema nameLeg DaysTravel Expense TypeAmount in $Calculated Field - AVG
      1111Business Trip12TAXI12.002.00
      1111Business Trip12TAXI12.002.00
      1111Business Trip10Car45.00
      2222Business Trip20TAXI34.0012.5
      2222Business Trip20TAXI12.0012.5
      2222Business Trip20TAXI56.0012.5
      2222Business Trip20TAXI23.0012.5
      3333Executive5TAXI10.008
      3333Executive5TAXI10.008
      3333Executive5TAXI20.008
      4444Cancel12TAXI30.008
      4444NA12TAXI40.008
      4444Cancel12TAXI26.008

       

      Thank you

      Dave.