Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jorditorras
Creator
Creator

Show values of the past

Dear Gurus,

I have a table like this:

Date-TimeR Factor
4 October 18:38:0120
4 October 18:37:0112
4 October 18:36:0145
4 October 18:35:0152
4 October 18:34:0121
4 October 18:33:0134
4 October 18:32:0153
4 October 18:31:0135
4 October 18:30:0145
4 October 18:29:0133
4 October 18:28:0125
4 October 18:27:0112

Where the first row is the last record loaded. I have to calculate an Average between 9 and 11 values ago. That would mean an Average between 33, 25, 12.

Does anybody know a way to reach this calculation?

Thanks in advance.

Regards,

Jordi

1 Solution

Accepted Solutions
sunny_talwar

Is this in a KPI object? May be this

RangeAvg(

FirstSortedValue([R Factor], -[Date-Time], 9),

FirstSortedValue([R Factor], -[Date-Time], 10),

FirstSortedValue([R Factor], -[Date-Time], 11))

View solution in original post

7 Replies
sunny_talwar

Is this in a KPI object? May be this

RangeAvg(

FirstSortedValue([R Factor], -[Date-Time], 9),

FirstSortedValue([R Factor], -[Date-Time], 10),

FirstSortedValue([R Factor], -[Date-Time], 11))

jorditorras
Creator
Creator
Author

Genius!!!!!!

qliksus
Specialist II
Specialist II

One more way would be as below

RangeAvg(Below(sum(amt),9,11))

sunny_talwar

How will RangeAvg() work in a KPI object? Did you forget to add Aggr() may be? Although one other way is to use set analysis....

qliksus
Specialist II
Specialist II

OP didn't mentioned anything about KPI and yes it wont work for KPI until we use the advanced aggregation method to sort the values

sunny_talwar

I guess I deduced that from the request that he is looking for the average of 9th, 10th and 11th highest number... this didn't seemed like a rolling average request.... but I you are right, OP did not mention that he needed this in the KPI. My bad and I apologize

qliksus
Specialist II
Specialist II

No need for apology dude