Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Juan_Mega
Contributor III
Contributor III

FILTRAR POR UN RANGO DE FECHAS, SIN DATAPICKER

Necesito que el usuario ingrese una fecha y que el reporte se filtre desde '2022-03-02' esta fecha que seria constante y la variable que seria la que ingresa el usuario, en mi carga de datos tengo un campo fecha, hay alguna forma de crear una variable que almacene la fecha que ingresa el usuario ? para luego usar el campo fecha y la variable para mostrar los datos en ese rango de fechas ? 

El datepicker no me permite preseleccionar y bloquear la fecha inicial por lo que lo he descartado como solución.

Labels (4)
1 Solution

Accepted Solutions
Clement15
Creator III
Creator III

You can use the following measure (if the name is correct)

Sum({<date={">=$(='02/03/2022') <=$(vDate)"}>}FISICA_DISPONIBLE)

Also pay attention to the date format, I don't know if we use the same, but you can change it to suit yours.

View solution in original post

12 Replies
Clement15
Creator III
Creator III

Hello, you can use a 'variable input' chart in the Input Box where the user will choose the desired date. And you use this set analysis in your measure.

{<date={">=$(='02/03/2022') <=$(vDate)"}>}

Clement15_0-1709302840104.png

 

Juan_Mega
Contributor III
Contributor III
Author

Intente hacer lo que enviaste, peor no encuentro la variable vDate donde puedo declarar la variable.

Juan_Mega_0-1709303439511.png

 

Clement15
Creator III
Creator III

You must create the vdate variable first. You can leave it blank when creating.

Juan_Mega
Contributor III
Contributor III
Author

¿Cómo creo la variable? 

Clement15
Creator III
Creator III

Clement15_0-1709303929030.png

Once created, you can use it in the variable input

Juan_Mega
Contributor III
Contributor III
Author

Genial ya pude crear la variable, ahora siguiendo la lógica que explicaste anteriormente. como puedo hacer q todo el grafico reaccione a este rango de fechas. 
Por ejemplo este kpi.

Juan_Mega_0-1709304309444.png

 




Clement15
Creator III
Creator III

You can use the following measure (if the name is correct)

Sum({<date={">=$(='02/03/2022') <=$(vDate)"}>}FISICA_DISPONIBLE)

Also pay attention to the date format, I don't know if we use the same, but you can change it to suit yours.

Juan_Mega
Contributor III
Contributor III
Author

Realice todo lo indicado; 
Pero el kpi trae un valor de cero 

Juan_Mega_0-1709305371009.png

Juan_Mega_1-1709305391750.png

El KPI q esta arriba es el que estoy probando y el de abajo es el que trae el valor total. 

 

 

 

Clement15
Creator III
Creator III

Is your field considered a date field?µ
And the DateFormat variable in the main is in the date format you're using?