1 Reply Latest reply on Dec 29, 2016 11:51 AM by lenaic.ridinger

    Calculation on the subset of the Data

    Ronaldo m

      The Calculation Average on a MAIN_ATTRIBUTE which has two values like Basic and Pro


      { FIXED [AttributeName1],[MAIN_ATTRIBUTE],[AttributeName3],[AttributeName4]:AVG([AnotherAttribute])}


      When i use the above Calculation i will be having 0.55 and 0.85 for Basic and Pro respectivly


      But what i m looking for is for the Pro it should be like 0.55*0.85


      which in case the formula can be like this,which is syntactically wrong


      if MAIN_ATTRIBUTE = 'Basic'
      { FIXED [AttributeName1],[MAIN_ATTRIBUTE],[AttributeName3],[AttributeName4]:AVG([AnotherAttribute])}
      { FIXED [AttributeName1],[MAIN_ATTRIBUTE] == 'Basic',[AttributeName3],[AttributeName4]:AVG([AnotherAttribute])} *
      { FIXED [AttributeName1],[MAIN_ATTRIBUTE] == 'Pro',[AttributeName3],[AttributeName4]:AVG([AnotherAttribute])}


      in the else part it should be it should be the product as shown above,How can this be acheived, BAsically how to calculate on the subset of the main data.

        • 1. Re: Calculation on the subset of the Data

          Hello Ronaldo m,


          Could you please try the following?


          IF MAIN_ATTRIBUTE = 'Basic'

          THEN {FIXED [AttributeName1],[MAIN_ATTRIBUTE],[AttributeName3],[AttributeName4]:AVG([AnotherAttribute])}

          ELSE MAIN_ATTRIBUTE = 'Pro'




          If this is not what you were looking for, could you please post a workbook so we can have a keener look at your question?