Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Please visit COVID-19 group to keep up the discussion. GO TO GROUP
New Contributor III

Qlik Sense moving average line for date

I am trying to create an alternative measure in a line chart to calculate a moving average. 

Currently I have two dimensions in my line chart
1. Products
2. Date

The average line needs to be moving/dynamic by date ( found on the x-axis). It needs to find the average for where the products are "A1" and "A2" (see formula below)

I tried the following formula but it shows a flat across all months so it's currently not dynamic based on date:

=(sum({<product_id={'A1','A2'}>} TOTAL <date> value)/sum({<total_products>} TOTAL <date> value))

Labels (4)
1 Reply
MVP & Luminary
MVP & Luminary

Re: Qlik Sense moving average line for date