10 Replies Latest reply: Oct 30, 2014 7:59 AM by Jonathan Dienst RSS

    Generation of new filed from 2 fields loaded by resident statement

      Hi experts

       

      I have the following problem:

       

      In my script I generate 2 fields like the following:

       

      Load

          jobnr,

          sum(Rohertrag) as Rohertrag_total_AP,

          sum(VK_soll) as VK_soll_total_AP

      resident job where Gesellschaft = 'AP' group by jobnr;

       

      and

       

      Load

          jobnr,

          sum(Rohertrag) as Rohertrag_total_APVJ,

          sum(VK_soll) as VK_soll_total_APVJ

      resident job where Gesellschaft = 'AP' AND datum_auftrag < Date(AddYears(Today(),-1)) group by jobnr;

       

      Now I would like to calculate Rohertrag_total_AP/Rohertrag_total_APVJ as a new field, say X. How is this done? If I enter another load statement I do not get an error. But the new field does not appear.

       

      Thank you for your help!

       

      Jan