Necesito saber cual es el error en esta formula

Hola, estoy construyendo esta formula para tener informacion filtrada que involucra dos tablas pero me da un error que no he podido solucionar. Gracias de antemano

IF(SELECT(Diario de Movimientos[Forma de Pago],Formas de Pago[Forma de Pago].[Tipo Forma Pago]=“CxP”),(SUM(SELECT(Diario de Movimientos[Totalizacion Egresos $],[Proveedor]=[Proveedor])))-(SUM(SELECT(Diario de Movimientos[Total Abono CxP $],[Proveedor]=[Proveedor]))),“Error en Lookup”)

0 1 132
1 REPLY 1

I think you have a few problems here. Your IF function needs to take a boolean as the first parameter but you have a SELECT function as the first parameter. A SELECT function returns a list of values so it doesn’t work as a boolean input for your IF function. You could put a COUNT() function around it and then compare the count to zero to see if your SELECT returns any values.

Your SELECT functions also seem like they aren’t really correct. Your first SELECT function uses the list of values from the Forma de Pago column on the Diario de Movimientos table, but then the filter condition references a field on a different table which seems incorrect. And your other 2 SELECT functions might need to use something like [_THISROW].[Proveedor]. You might want to look at the SELECT function documentation: SELECT() | AppSheet Help Center

Top Labels in this Space