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: 
Not applicable

expresion dudas

Buenos dias,

     Aunque llevo algun tiempo con Qlik soy novato aun, estoy peleandome con una expresion y aunque no me da error me sale un "-", tengo datos por fecha de tres años y quiero sacar en una expresion el dato del mes y año selecionado con esto no hay problema pero en otra expresion quiero sacar el dato justo del mes del año anterior y aqui es donde me sale el guion. es posible que haya algun conflicto entre lo seleccionado y la expresion?

como ejemplo esta tabla, donde si en Qlik selecciono 2012 y enero deberia sacarme 15 en una expresion y 10 en la otra.

fechatipoañomesdato
01/01/2011A2011-ene10
01/02/2011A2011-feb5
01/03/2011B2011-mar20
01/01/2012A2012-ene15
01/02/2012C2011-feb30

La expresion que uso y me sale un guion es:

Sum({$<Tipo={'A'} , AñoMes={$(=MAX(Year)-1 &'-'& Month)}>} dato):

Muchas gracias por vuestra ayuda.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If you have a field called Year then I think you can do it like this:

Sum ({$ <Tipo={'A'}, AñoMes=, Year={$(=MAX(Year)-1)}>} dato)


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
sushil353
Master II
Master II

is it possible to explain the above in English?

Not applicable
Author

I would like to get some data using the selected month and year, with this expression no problem, but with another expression on the same graph I would like to get the data from the same month last year, In this expression results in me "-"

the table is an example than I need, if I select January and 2012, this should result in the expression1=15 and  in the expression2=10. expression does not work is:

expression2: Sum ({$ <Tipo={'A'}, AñoMes={$(=MAX(Year)-1 &'-'& Month)}>} dato)

I hope you understand

thank you very much

Gysbert_Wassenaar

If you have a field called Year then I think you can do it like this:

Sum ({$ <Tipo={'A'}, AñoMes=, Year={$(=MAX(Year)-1)}>} dato)


talk is cheap, supply exceeds demand
julian_rodriguez
Partner - Specialist
Partner - Specialist

Hola, puedes utilizar el calendario que viene en el desarrollo de Qlikview Components

(http://community.qlik.com/thread/40043?tstart=0)

Te genera las variables con el set analisys necesario para tu requerimiento y más.

Lo uso hace tiempo y funciona muy bien

Saludos!