Why if the list has no items, does the number show that it does?

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:

TalkNet_TechnoS_0-1692831940471.png

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])
                                        )
                            )

 

 

 

 

 

 

0 2 156
2 REPLIES 2

This kind of problem, short of seeing a syntax issue, is kinda impossible for us to help with.  Since we can't see the data, nor know what your expecting to see.  But let me give you a suggestion to help.  Take

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 add this as a virtual column called [TEST1].  Then take 

AND(
[Nro de Serie]=[_THISROW].[Buscar por serie/Imei],
ISNOTBLANK([Nro de Serie]),
ISNOTBLANK([_THISROW].[Buscar por serie/Imei])
)

and make that into a virtual column called [TEST2].  Save.

Now find (or make) a record that should not match.  For this to happen both [TEST1] and [TEST2] must both be FALSE.  If they are not, investigate why.

Simon, 1minManager.com

Thanks for your answer.
What I expect to see does not depend on the data, since they are text comparisons, but I expect that the number shown in the title of the image (742) and the result of COUNT(), is the same as the number of items that shows the list. If you look at the image you can see that in the list there are no items and in the title it shows 742 items. It should be zero. And if I want to wrap that function in COUNT() to use the total number of items, the result is still 742, instead of 0. Now, if it's 742, why does the list appear empty?

Top Labels in this Space