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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
mvivanco
Contributor III
Contributor III

Using variables in Qlik Sense

Hello everyone:

I am using Qlik sense and I find it very  useful. I have a small problem using variables that are not presented in QlikView

I have defined two variables:

SET vAñoMesDiaMax=Max(Year([Start Time])& Date([Start Time],'MM')&Date([Start Time],'DD'));

SET vDiaMax=right(Max(Year([Start Time])& Date([Start Time],'MM')&Date([Start Time],'DD')),2);

SET vAñoMesDiaPasado=if($(vDiaMax)<1,$(vAñoMesDiaMax)-70,$(vAñoMesDiaMax)-1);

When used in a script did not report anything.The expression used is as follows

Avg({<Año=,Mes=,AñoMesDia={">$(vAñoMesDiaPasado)<=$(vAñoMesDiaMax)"}>}Disponibilidad)

En Qlikview is Ok.

But i Use the next sentence result OK. with the Variables:

SET vAñoMesDiaMax=20141128;

SET vAñoMesDiaPasado=20141127;

Avg({$<Año=,Mes=,AñoMesDia={">20141127<=20141128"},ESTADO_CELDA={'EN_SERVICIO'}>}DISPONIBILIDAD)

where will I be wrong?

Regards

Moises

0 Replies