Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Taking average of data in two months

hi all,

I would like to calculate the (open bal+ ending bal)/2 which is the data in for example, average of Jun balance and July balance

and the data should be show on the row of July

for example:

MonthOpen_Amtaverage
04100
05200(100+200)/2=150
06250225
07300275

However, I cannot manage to write expression to represent the average value of two row

Can anyone teach me what should i do to show average?

Thanks,

K

4 Replies
Not applicable
Author

(above(expression,0,1)+ expression)/2

or

rangeavg (above(expression,0,2))

Not applicable
Author

Thanks , I have tried using this expression as well. But there's another problem is that the first month data cannot be displayed( e.g. for 2012 Jan, I would like to have an average value with 2011 Dec). Moreover, when there is filtering in months that is not in sequences (for example, 01,04,05) the data shown would be wrong.

So I am wondering how I could solve this problem.

Thanks

Not applicable
Author

can you post a sample file?

Not applicable
Author

As shown in the file, the first data of 2012 cant be display.