11 Replies Latest reply: Feb 11, 2016 10:29 AM by Stefan Wühl RSS

    Expression is giving me the wrong results

    lakwinder singh

      Hi Guys,

       

      I've got a calculation in EXCEL that is -14867/-3245 that gives me a result of 458.1%.

       

      But when I do the same calculation in QS, I'm getting something completely different.64239357%

       

      Here's the expression

       


      ceil(sum({<[SALES MONTH]={'$(vMonthPrevious5)','$(vMonthPrevious3)','$(vMonthPrevious4)'}
      ,NEW_PRODUCT_FAMILY_DESC={"AAA"}>}[AAA Value PQ]),5)/1000

      -

      ceil(sum({<[SALES MONTH]={'$(vMonthPrevious6)','$(vMonthPrevious7)','$(vMonthPrevious8)'}
      ,NEW_PRODUCT_FAMILY_DESC={"AAA"}>}[AAA Value PQ]),5)/1000

      /

      ceil(sum({<[SALES MONTH]={'$(vMonthPrevious5)','$(vMonthPrevious3)','$(vMonthPrevious4)'}
      ,NEW_PRODUCT_FAMILY_DESC={"AAA"}>}[AAA Value PQ]),5)/1000

      +
      ceil(sum({<[SALES MONTH]={'$(vMonthPrevious5)','$(vMonthPrevious3)','$(vMonthPrevious4)'}
      ,NEW_PRODUCT_FAMILY_DESC={"BBB"}>}[BBB Value PQ]),5)/1000

      -

      ceil(sum({<[SALES MONTH]={'$(vMonthPrevious6)','$(vMonthPrevious7)','$(vMonthPrevious8)'}
      ,NEW_PRODUCT_FAMILY_DESC={"AAA"}>}[AAA Value PQ]),5)/1000

      +

      ceil(sum({<[SALES MONTH]={'$(vMonthPrevious6)','$(vMonthPrevious7)','$(vMonthPrevious8)'}
      ,NEW_PRODUCT_FAMILY_DESC={"BBB"}>}[BBB Value PQ]),5)/1000

       

       

      Thanks in advance