3 Replies Latest reply: Aug 23, 2012 9:57 AM by Jonathan Dienst RSS

    Multiply (or divide) two values from the same dimension in load script

      I want to create calculated value based on other values from the same dimension. As an example, I have an account Sales and an account COGS. Now I want to create a new account "COGS in % of Sales". This would be easy in a table but I need to create this in the load script.



      LOAD * INLINE [

          Period, Account, Value

          201201, Sales, 100

          201201, COGS, 50

          201202, Sales, 110

          201202, COGS, 45



      Now I would need something like


      load Period,

             "COGS in % of Sales" as Account,

             (load Value resident LoadData where Account = 'COGS') / (load Value resident LoadData where Account = 'Sales') as Value

      Resident LoadData;


      Any idea?