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

Rolling based last three months average sale

Hi,

I want to calculate the last three month's (if the current month is "June" the last three months should be March, April & May) average sales.

Please find the below table for the data set.

   

Sales
Prod_IDProd_NameJanuaryFebruaryMarchAprilMayJune
P100A100120110112130120
P101B506045304250
P102C115130125120110130
P104D200220230200190210
P105E606575486055
P106G105120125130110140
P107H909511085120100

I simply loaded the data in to Qlik View and thought of using a measure to calculate the average sales of the last three months and adding it as a new column, however, I am finding it bit tricky at the moment.

I am wondering whether I can use the "rangeavg" function to fulfill my said requirement?

Appreciate if someone could help me with this issue.

Thanks a lot in advance.

Kind regards,

Andy

10 Replies
andymanu
Creator II
Creator II
Author

Hi Fawaz,

Thank you for your reply.

I did according to what you said but it calculates the total cost of each Project Component for the given months, not the annualised cost amount?

Also would like to know the use of "ColumnNo()=0" expression?

Thank you.

Kind regards,

Andy