4 Replies Latest reply: May 8, 2013 10:01 AM by Stefan Wühl RSS

    Calculated dimension using "ABOVE" function

    Steve Zagzebski

      I have the following calc dimension:

       

      =if(above([Incurred_Year_Month_Num])+1=[Incurred_Year_Month_Num] and above([MEMBER_ID])=[MEMBER_ID],above([Plan Rollup]),'NA')

       

      Basically I am just trying to add a calculated dimension "Plan Rollup" by comparing the record above in a straight table. It is coming back as an error but I don't see what is wrong?

        • Re: Calculated dimension using "ABOVE" function
          Eddy Sanchez

          Try this:

           

          =aggr(if(above([Incurred_Year_Month_Num])+1=[Incurred_Year_Month_Num] and above([MEMBER_ID])=[MEMBER_ID],above([Plan Rollup]),'NA'),[Incurred_Year_Month_Num])

           

          If this doesn't solve, send more information why you want this straight table, what are your expressions?

          • Re: Calculated dimension using "ABOVE" function
            Rob Wunderlich

            I'm doubtful you could use above() in a calculated dimension. A calculated dimension builds the rows of a chart. above() considers the rows of a chart. So you have a circular logic problem.

             

            Can you describe your objective and maybe we have other suggestions?

             

            -Rob

              • Re: Calculated dimension using "ABOVE" function
                Steve Zagzebski

                Rob - your answer is helpful. A good way to look at it.

                 

                What I am trying to do is basically bring the previous dimension to the same line as the current dimension.

                 

                For instance when  we renew a contract for a client there is a specific attribute about the contract we want in our table. However we also want to know what that attribute was in the previous month (before the renewal month) and have it on the same row. I wrongly thought I could use above to get the attribute from the previous month.  Does that make sense what we are trying to accomplish?