Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Get 6 last values average in front end

Hello,

In the front end I have a table like this:

MindaugasBacius_1-1612956679495.png

The expression: (Sum(Value1) + Sum(Value2))/ Sum(Value3)

 

The customer wishes to get a table that shows the last 6 values average for each Supplier:

MindaugasBacius_2-1612956802817.png

 

The result depends on the Date selections - like supplier c there is only one value and the result is calculated from only one value. But with d supplier, there are more than 6 values. In this case, only the last 6 values should figure while calculating average.

MindaugasBacius_0-1612956561667.png

All the calculations have to be made in front end.

Thank you!

 

Labels (2)
1 Solution

Accepted Solutions
marcus_sommer

Maybe something like this:

if(Date >= max(Date, 6), avg(Value))

- Marcus

View solution in original post

3 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III
Author

Every advice would earn you some karma points 🙂

marcus_sommer

Maybe something like this:

if(Date >= max(Date, 6), avg(Value))

- Marcus

MindaugasBacius
Partner - Specialist III
Partner - Specialist III
Author

I now get the idea! Thank you.