Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
In my application I need to calculate the variation between the first and last Price for each product entered in the selected period.
Attached file example, in which when I select a product works perfect but when it is more than one product, it does not work.
Regards.
Try with firstSortedValue() function
FirstSortedValue(Aggr(Sum(Precio), NumFecha, Producto), Aggr(NumFecha, NumFecha, Producto))
FirstSortedValue(Aggr(Sum(Precio), NumFecha, Producto), -Aggr(NumFecha, NumFecha, Producto))
FirstSortedValue(Aggr(Sum(Precio), NumFecha, Producto), -Aggr(NumFecha, NumFecha, Producto))/FirstSortedValue(Aggr(Sum(Precio), NumFecha, Producto), Aggr(NumFecha, NumFecha, Producto))-1
Try with firstSortedValue() function
FirstSortedValue(Aggr(Sum(Precio), NumFecha, Producto), Aggr(NumFecha, NumFecha, Producto))
FirstSortedValue(Aggr(Sum(Precio), NumFecha, Producto), -Aggr(NumFecha, NumFecha, Producto))
FirstSortedValue(Aggr(Sum(Precio), NumFecha, Producto), -Aggr(NumFecha, NumFecha, Producto))/FirstSortedValue(Aggr(Sum(Precio), NumFecha, Producto), Aggr(NumFecha, NumFecha, Producto))-1
It works perfectly. Thanks.
Regards.
Hi.
More complicated, if I want to find the average, that is, the sum of the column "%" on count (Producto). In the example it would be: 260.09 / 13 = 20.01.
Regards.
Not entirely sure I follow