11 Replies Latest reply: Nov 26, 2015 5:54 AM by Tatsiana Chetirbok RSS

    Max of a calculated dimension in load script

    Dingyong Huang

      What I need

      Maximum proportion of delayed flights by airport ID. Ie., (max (delayed flights/ non cancelled & non delayed flights))

      I want to create this dimension in the load script.


      Data

      The data file contains:

      • flight dates (FL_DATE)
      • origin of the flight (ORIGIN_AIRPORT_ID)
      • status of whether the flight was delayed or not (DEP_DELAY_GROUP) //more than 0 means its delayed. if there are no values, it means the flight is cancelled or diverted)

       

      FL_DATEORIGIN_AIRPORT_IDDEP_DELAY_GROUP
      1/1/201512478-1
      2/1/201512478-1
      3/1/201512478-1
      4/1/201512478-1
      5/1/201512478-1
      1/1/201512892-1
      2/1/201512892-1
      3/1/2015128921
      4/1/20151289210
      5/1/201512892-1
      26/1/201512892
      27/1/201512892
      28/1/2015128922
      29/1/201512892-1
      30/1/201512892-1
      31/1/201512892-1
      1/1/201512478-1
      2/1/201512478-1
      3/1/201512478-1
      4/1/201512478-1
      5/1/201512478-1
      6/1/201512478-1
      7/1/201512478-1
      8/1/201512478-1
      9/1/2015124780

       

      Would really appreciate help!