3 Replies Latest reply: Jun 29, 2017 4:05 PM by Kelly McGrady RSS

    How to skip an expression when there is a zero value in part?

    Austin Cornwell

      Here is the current code,

       

      ((Alt(sum(if(Month='January',GP))/sum(if(Month='January',[Extended Amount])),0)-(Alt(sum(if(Month='February',GP))/sum(if(Month='February',[Extended Amount])),0)

      +Alt(sum(if(Month='February',GP))/sum(if(Month='February',[Extended Amount])),0)-(Alt(sum(if(Month='March',GP))/sum(if(Month='March',[Extended Amount])),0)

      +Alt(sum(if(Month='March',GP))/sum(if(Month='March',[Extended Amount])),0)-(Alt(sum(if(Month='April',GP))/sum(if(Month='April',[Extended Amount])),0)

      +Alt(sum(if(Month='April',GP))/sum(if(Month='April',[Extended Amount])),0)-(Alt(sum(if(Month='May',GP))/sum(if(Month='May',[Extended Amount])),0))))))

      *-1)/5

       

      So basically, I am taking January's GP % less February's + February's less March’s, etc.

       

      However, if there are no sales in one of those months, it is skewing the data by either not subtracting anything or subtracting a full months number from 0. How do I make that particular part of the equation not factor in when one of the months has no sales?