Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Different Results with same Formula

Hello,

I have done 2 different tables but with any similar expressions as a follow:

This is my Dimension in one table:

=If(Today()-335 <

If(Isnull(fecha_precep) = '0',If(fecha_precep = '0',if(isnull(fecha_venc11) = '0', if(fecha_venc11 = '0',fecha_creacion,fecha_venc11),fecha_creacion),fecha_precep),

if(isnull(fecha_venc11) = '0', if(fecha_venc11 = '0',fecha_creacion,fecha_venc11),fecha_creacion)),'Compras <  1 Año')

I get this formula from another pivot (same formula (Expression):

If(Today()-335 <

If(Isnull(fecha_precep) = '0',If(fecha_precep = '0',if(isnull(fecha_venc11) = '0', if(fecha_venc11 = '0',fecha_creacion,fecha_venc11),fecha_creacion),fecha_precep),

if(isnull(fecha_venc11) = '0', if(fecha_venc11 = '0',fecha_creacion,fecha_venc11),fecha_creacion)),'Compras <  1 Año') ' Until Here for my dimension Calculation'

//This is the rest

,if(Sum(Inventario) + Sum(RCT_PO) = '0','Sin Status',

If(Sum(Consumo11) + Sum(Despacho) = '0', 'Inmovilizado',

If(Sum(Inventario) + Sum(RCT_PO) <= Sum(Consumo11) + Sum(Despacho),'Entre 0 y 1 Año',

If(Sum(Inventario) + Sum(RCT_PO) <= 2*(Sum(Consumo11)+Sum(Despacho)),'1 - 2 Años','Sobrestock')))))

The problem is that  I have 2 different values:

In one pivot I have Estado = "Entre 0 y 1 Año" Thats means that I don´t have values in 'Compras < 1 Año'

In the other table (Calculation Dimension) I have values in 'Compras < 1 Año' The final result throw 2 codes with values (thats wrong).

The final result has to '0' all codes'

What could it be?

Thanks!

1 Solution

Accepted Solutions
pgalvezt
Specialist
Specialist
Author

The error was in the principal Base in QAD... Hahaha. That waste in time (Sorry about that)

Thanks!

View solution in original post

3 Replies
Not applicable

la funcion  intervalmatch es la pejor solucion por este tipo de problemo.

pgalvezt
Specialist
Specialist
Author

Hola Eva,

podrías ayudarme como implementar esa función en mi fórmula.

Gracias,

pgalvezt
Specialist
Specialist
Author

The error was in the principal Base in QAD... Hahaha. That waste in time (Sorry about that)

Thanks!