1 Reply Latest reply on Apr 27, 2019 10:24 PM by Chris McClellan

    Table Calculation Percent Difference Wrong Numbers

    Arsalan Qureshi

      Hi Everyone,

       

      Please find below my sample data set:

       

                    Year                                               2016                                            2017                                   2018                 

                                

      Number of Customers                                 20,703                                          20,584                                20,557                                              

       

       

                                                                                                 16 - 17                                17 - 18

                                                                                                -.53%                                 -.30%

       

      The issue I am facing is that for (17 - 18) the percent being calculated is wrong. It should be (20557- 20584 / 20584) = -.13%.

       

      The interesting part of the story is that the (16 - 17) difference is being calculated accurately, its the (17 - 18) that is derailing.

       

      I am doing distinct count off customers --> cntd(customers) then quick calculation type of percent difference from specific dimensions on Year relative to Previous.

       

      (LOOKUP(COUNTd([Customers]),0) - LOOKUP(COUNTd([Customers]),-1) )

      /LOOKUP(COUNTd([Customers]),-1)   ---------> The Table Calculation Formula.

       

      Thanks in advance.