Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Performing Calculation for Current and Past Month Information

Hi All,

I am have a straight table displaying different months of data as below and am unsure how do I get average of 2 months.

MonthYearItemTotal CostAverageOf2Months

01/2014

A100Expected Value 100+300/2
02/2014A300Expected Value 300+(Till Date Total Cost)/2
01/2014B200Expected Value 200+400/2
02/2014B400Expected Value 400+(Till Date Total Cost)/2

Anyone knows how can I perform the calculation to get my expected value?

I have the full date e.g 31/01/2014 but I have converted it to months/year to perform necessary calculation to total the cost of item A for the month. I am unsure how would I reference the total cost of item A in Feb 2014 to get my average. Can anyone help?

Thanks!

5 Replies
Not applicable
Author

Anyone able to help? Thanks!

Not applicable
Author

can you do a

rangeavg(Total Cost, Below(Total Cost))

Not applicable
Author

PFA an example.

Not applicable
Author

Hi Ramkumar,

The solution works but is there anyway I could get the formula to calculate by item?

Base on the sample qvw, I have to sort the table by item before it works and is there anyway I can get the last value to not perform average if it is the last value?

Regards,
Raymond

Not applicable
Author

PFA.

Already the last item was not calculating average it it was the last item. May be i don't get you.