0 Replies Latest reply: Feb 8, 2017 3:36 AM by Mohammad Sarif RSS

    Cumulative Chart is not working when Denominator is dynamic

    Mohammad Sarif

      Hi All,

      I have a Cumulative Chart. Which is average of last few same days value. However the denominator is dynamic depending on no of holidays.

      Below is the expression:


      (RangeSum(Above(Sum({$<Z_DATE=, Holiday_HD = {'N'},M_DATE={'$(=(Date(Date#('$(vDATE)','M/D/YYYY') - 7)))'}>} [ORD_LINE_CNT]),0,RowNo()))

      +RangeSum(Above(Sum({$<Z_DATE=,Holiday_HD = {'N'}, M_DATE={'$(=(Date(Date#('$(vDATE)','M/D/YYYY') - 14)))'}>} [ORD_LINE_CNT]),0,RowNo()))

      +RangeSum(Above(Sum({$<Z_DATE=,Holiday_HD = {'N'}, M_DATE={'$(=(Date(Date#('$(vDATE)','M/D/YYYY') - 21)))'}>} [ORD_LINE_CNT]),0,RowNo()))

      +RangeSum(Above(Sum({$<Z_DATE=,Holiday_HD = {'N'}, M_DATE={'$(=(Date(Date#('$(vDATE)','M/D/YYYY') - 28)))'}>} [ORD_LINE_CNT]),0,RowNo()))) /

      ((4*Count (distinct PLANT)) - Count({<Dates1 = {"$(=Date(Date#('$(vDATE)','M/D/YYYY') - 7))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 14))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 21))","$(=Date(Date#('$(vDATE)','M/D/YYYY') - 28))"} >}Dates))

      The denominator is dynamic here. If we put the same expression in single KPI. It is returning correct value. And if we put that numeric value in expression denominator, the cumulative chart is behaving wrongly.

      Please help.