SELECT in ORDER NOT WORKING

Hi,
I would like to understand why the following expression does not work.
The expression should return a number, but the problem is that there is an error in the ORDERBY expression.

ANY
(
TOP
(
ORDERBY
(
SELECT
(
Lista[_RowNumber],
[comune_geom] = [_THISROW].[comune_geom]
),
[PositionINDEX],
FALSE,
[id],
FALSE
),
1
)
)

Where is the error, if there is one?
Thanks for the explanation…

May be [_ROWNUMBER] is not a key. Check SELECT in VC. Check result type.

1 Like