I have a SELECT that selects items that have the same serial number or whose order number matches the warranty deposit number, which has already been delivered and is not the same row, as shown in the code. It also makes sure that the fields are not empty or zero. The surprising thing is that the resulting list is correct, but the number of items is almost all records (see image), and the same thing happens if I wrap the function in COUNT(). Any idea what might be causing this inconsistency and a way to fix it?
SELECT(Reparaciones[Rep Id],
AND(
OR(
[Nro de Orden]=[_THISROW].[Garantía],
AND(
[Nro de Serie]=[_THISROW].[Nro de Serie],
ISNOTBLANK([_THISROW].[Nro de Serie]),
ISNOTBLANK([Nro de Serie]),
[_THISROW].[Nro de Serie]<>0,
[Nro de Serie]<>0
),
AND(
[Nro de Serie]=[_THISROW].[Buscar por serie/Imei],
ISNOTBLANK([Nro de Serie]),
ISNOTBLANK([_THISROW].[Buscar por serie/Imei])
)
),
[_THISROW].[_RowNumber]<>[_RowNumber],
[Estado Virtual]="Entregado"
)
)
Look at the image:
The count selects all those who meet this condition:
[_THISROW].[_RowNumber]<>[_RowNumber],
[Estado Virtual]="Entregado"
but does not take into account
OR(
[Nro de Orden]=[_THISROW].[Garantía],
AND(
[Nro de Serie]=[_THISROW].[Nro de Serie],
ISNOTBLANK([_THISROW].[Nro de Serie]),
ISNOTBLANK([Nro de Serie]),
[_THISROW].[Nro de Serie]<>0,
[Nro de Serie]<>0
),
AND(
[Nro de Serie]=[_THISROW].[Buscar por serie/Imei],
ISNOTBLANK([Nro de Serie]),
ISNOTBLANK([_THISROW].[Buscar por serie/Imei])
)
)
User | Count |
---|---|
35 | |
11 | |
3 | |
3 | |
2 |