Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression to compare price of a Product per Year / Expresión para comparar precio de un Producto por Año

Good morning, I need to compare the price of my product and add two new columns that say if it went up or under the product. The truth is that I'm new to qlik and I've tried it several times but I do not get it. I only bring how much price to have the product in this case tells me that 3.

I did so = Aggr (count (DISTINCT Price), Product, CCO_CompanyName)

evidencia.png

I hope you can help me, thanks

Note: Edited by community moderator to include English translation as a courtesy. Please use English in main forums.

- - -

Buen dia, necesito comparar el precio de mi producto y agregar dos columnas nuevas que digan si subió o bajo el producto. La verdad soy nueva con qlik y ya lo he intentado de varias formar pero no lo logro. Solo traigo cuantos precio a tenido el producto en este caso me dice que 3.

Lo hice así =Aggr(count(DISTINCT Precio),Producto, CCO_CompraANombre)

evidencia.png

Espero me puedan ayudar gracias

1 Solution

Accepted Solutions
vhespinog
Contributor III
Contributor III

Intenta algo así

=Aggr(if(Above(Precio)>Precio,'Bajo', if(Above(Precio)<Precio,'Subio','Sin Cambios')),Producto,Mes)

View solution in original post

4 Replies
vhespinog
Contributor III
Contributor III

Hola.

Si solo tienes cambio de precios por mes, puedes hacer algo como esto (ver archivo adjunto), si el producto tiene varios cambios en el mes necesitas haces algo mas complejo. Revisa esto y checa si te sirve.

Saludos.

Anonymous
Not applicable
Author

Descargue el archivo pero no lo pude abrir

vhespinog
Contributor III
Contributor III

Intenta algo así

=Aggr(if(Above(Precio)>Precio,'Bajo', if(Above(Precio)<Precio,'Subio','Sin Cambios')),Producto,Mes)

Anonymous
Not applicable
Author

Segui tu consejo y lo meti pero de la siguiente manera

=Aggr(if(Above(Precio)>Precio,'Bajo', if(Above(Precio)<Precio,'Subio','Sin Cambios')),Producto,CCO_CompraANombre,SC_Almacén,CCO_CompraANombre,CC_Mes)

En algunas partes si lo agarra pero en otras no identifica bien

resultado.jpg