Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Tricky Average!

Hi Experts!

I'm trying to do some enhancement to the solution I mentioned here:Simple Average Problem

I now have extra data which is now concatenated to the same table in the Simple Average Problem.

tab7.PNG

Showing the average against ID was easy but I now want to be able to show last three date sale average against Service Order, Service Name and Future Dates. Is this possible?

The resultant straight table should look like this:

tab9.PNG

I'm attached the data and the app if anyone wants to give it a try. Thanks

3 Replies
sunny_talwar

May be this

=Aggr(Avg(TOTAL <ID> Aggr(If(Rank(Date) < 4, Sale), ID, Date)) , ID, ServiceOrder, FutureDates)

Capture.PNG

Anonymous
Not applicable
Author

Hey Sunny thanks for your help. This is exactly what I wanted. The only thing is that as soon as I make a selection, all calculations disappear.

tab10.PNG

I want to be able to make service order selection and be able to see the relevant calculations as well.

sunny_talwar

Try this:

=Aggr(Avg({<ServiceOrder>}TOTAL <ID> Aggr(If(Rank(Only({<ServiceOrder>}Date)) < 4, Only({<ServiceOrder>}Sale)), ID, Date)) , ID, ServiceOrder, FutureDates)