Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
fecha | tipo | añomes | dato |
01/01/2011 | A | 2011-ene | 10 |
01/02/2011 | A | 2011-feb | 5 |
01/03/2011 | B | 2011-mar | 20 |
01/01/2012 | A | 2012-ene | 15 |
01/02/2012 | C | 2011-feb | 30 |
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.
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)
is it possible to explain the above in English?
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
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)
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!