Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Rolling Twelve Months

Hello Team,


I have requirement for Rolling Period in Line Chart

Dimension : Year

Measure : sum(Attrition) for the year / average(employees) for last 12 months


The problem is the dimension Year where we need to calculate average for rolling last 12 months .


For example for Dimension 2019 : Number of employees who left in 2019 / Average of employees for last 12 months(i.e. from Mar 2018 to Feb 2019)


How can it be done?



Labels (2)
3 Replies
Master II
Master II

if you have a date column it will be easier to do so

Please refer the below for reference. 


What do you mean by average of employees here?


Learning never stops.
Master II
Master II

something similar to below should work Please check the field names once
dimension = year

measure = sum(Attrition)/ (count(Distinct{<date_column={">=addmonths(today(),-12)  <= today()"}>} Empoyees)/12)
Learning never stops.
Contributor III
Contributor III

Hello Pradosh,


This does not work.

I have a date field also , my dimension is Year(DateField).

The problem is for instance when this field has value 2019 it is not able to fetch values of Year 2018 but we want sum of rolling twelve months which in many cases will require data from past year also.