6 Replies Latest reply: Aug 12, 2016 9:00 AM by Narendiran Narayanan RSS

    Calculation of percentage not working as expected

    Robert Fishel

      Hello everyone.  I am trying to perform a calculation but the result I am getting is not correct.  Here is a break down of the formula:

       

      Sum({<grp_typ = {'1. GROUP A','2. GROUP B','3. GROUP C'}>}[Current Month])
      Current Month = 132  this is correct

       

      Sum({<grp_typ = {'1. GROUP A','2. GROUP B','3. GROUP C'}>}[Prior Month])
      Prior Month = 142  this is correct

       

      So what I would expect from the next formula is basically 132 - 142 / 142 which would be -0.0704...   or 7%

      Instead I am getting 13000 percent.  Please will someone tell me what is wrong with my formula below?  Thank you


      =num(Sum({<grp_typ = {'1. GROUP A','2. GROUP B','3. GROUP C'}>}[Current Month])-
      Sum({<grp_typ = {'1. GROUP A','2. GROUP B','3. GROUP C'}>}[Prior Month])/
      Sum({<grp_typ = {'1. GROUP A','2. GROUP B','3. GROUP C'}>}[Prior Month]),'#0%')