Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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_ID | Prod_Name | January | February | March | April | May | June |
P100 | A | 100 | 120 | 110 | 112 | 130 | 120 |
P101 | B | 50 | 60 | 45 | 30 | 42 | 50 |
P102 | C | 115 | 130 | 125 | 120 | 110 | 130 |
P104 | D | 200 | 220 | 230 | 200 | 190 | 210 |
P105 | E | 60 | 65 | 75 | 48 | 60 | 55 |
P106 | G | 105 | 120 | 125 | 130 | 110 | 140 |
P107 | H | 90 | 95 | 110 | 85 | 120 | 100 |
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
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