I need a counter of distinct [Id Paciente] on first (or last) [Orden Form] --> FirstSortedValue([Id Paciente],[Orden Form]) where [Valor Item]=2 and for Possible [Id Paciente] with [Orden Form]>=2
My expression doesn't seem to be able to distinguish between first or last [Orden Form] encapsulated on