# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Contributor II

## Cumulative Chart is not working when Denominator is dynamic

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.