0 Replies Latest reply: Nov 4, 2016 2:25 PM by Jes Lee RSS

    To create a new field for growth rate in the data editor

    Jes Lee

      Hello,

       

      I would like to create a new field for growth rate for another field in the data editor.  Is there a way to do this in the script?

      This is the script I'm using now to load the data-- I would like to create a new field with a computed growth rate (y/y) for [Alabama].


      Thank you,

      Jessica


       

      BLS_data_1:

      LOAD

          series_id,

          "year",

          period,

          value,

          Date(Makedate([year],right([period],2)), 'M/D/YYYY') as DATE,

          Date(Makedate("year",right(period,2)), 'MMMYYYY') as MONTHYEAR,

          If(series_id='SMS01000000000000001', value) as [Alabama]

       

      FROM [lib://BLS Employment Series AllData]

      (txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

       

       

      BLS_data:

      LOAD

        DATE,

        MONTHYEAR,

        'Employment' as [Series],

          SUM([Alabama]) as [Alabama]

       

      Resident BLS_data_1

      Group by MONTHYEAR, DATE;

      Drop Table BLS_data_1;