# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Average calculation

Hi friends,

I would like to calculate the average of the last 12 month (starting with 01.10.2017) and show them in a bar chart.

Can anyone help me with a formula to make it work like in my screenshot.

So the average from 01.10.2016 - 01.10.2017 would be 58,92 (red)

the average from 01.11.2016 - 01.11.2017 would be 60,54 (blue)

the average from 01.12.2016 - 01.12.2017 would be 54,39 (yellow)

and so on...

Thank you for any help!

markus

1 Solution

Accepted Solutions
Esteemed Contributor

## Re: Average calculation

Hi,

try this:

=RangeAvg(Above(sum(Price),0,12))

if it gives you correct values, you can set an if condition to start the calculation from 01/10/2017

4 Replies
Contributor II

## Re: Average calculation

Hi Markus,

Accumulative Sums

FYI, You are actually marking 13 months in Your illustration so You are actually doing calculation of 13 month rollling averages with those formulas which will throw You off if You compare to Sense formulas calculating 12 month rolling averages  - like Rangeavg(Above(sum(Price),0,12)).

Best Regards

Lucke

Esteemed Contributor

## Re: Average calculation

Hi,

try this:

=RangeAvg(Above(sum(Price),0,12))

if it gives you correct values, you can set an if condition to start the calculation from 01/10/2017

New Contributor III

## Re: Average calculation

Thank you Youssef!

It works exactly as I wanted to!

Best

Markus

Esteemed Contributor

## Re: Average calculation

you're welcome, don't forget to close the thread