for a customer I want to get to get the turnover value of the highest ranking position from all filtered receipts.
I use the Aggr function together with the FirstSortedValue function to determine the turnover. I get the right value but it appears behind the wrong receipt position.
Function:
SUM(
Aggr( FirstSortedValue(
GesamtUmsatz, -Restbon_Sortierung , 1)
, Bonnummer
)
)
GesamtUmsatz = turnover
Restbon_Sortierung = receipt position ranking (every position on each receipt is ranked with a unique value on the receipt)
Bonnummer = receipt number (every receipt got a unique number)
Example:
there are 9 position on a receipt, 5 of them have the subcategory 'L' (wich is selected / filtered), the highest ranking of theese 5 Positions is 'Product J' with a turnover of 7€. However, this value is displayed behind the first of the 5 selected positions ('Product F').
(It is all in the attachment)
Question:
How do I get the Value behind its corresponding position ('Product F')?
This is driving my crazy, any help is very much appreciated.