@tdzevad
Sure, given your data and your choice, you simply need to find the first of the lowest score of the difference between the values.
This Sample formula will provide the concept:
With({_data:
Table({AP1:-64, AP2: -81, AP3: -85, 'Real Position':"GP46"},
{AP1:-56, AP2: -77, AP3: -86, 'Real Position':"GP45"},
{AP1:-58, AP2: -72, AP3: -84, 'Real Position':"GP44"},
{AP1:-68, AP2: -70, AP3: -82, 'Real Position':"GP43"}
),
_choice: [-65, -82, -83]
},
First(
Sort(
ForAll(_data,
{Score: Abs(AP1 - Index(_choice, 1).Value) + Abs(AP2 - Index(_choice, 2).Value) + Abs(AP3 - Index(_choice, 3).Value),
'Real Position': 'Real Position'
}
),
Score, Ascending
)
)
)
This would return a record of {Score: 4, 'Real Position': GP46}
I hope this is helpful for you.