Turn on more accessible mode
Turn off more accessible mode
Skip Ribbon Commands
Skip to main content
Turn off Animations
Turn on Animations

Skip Navigation LinksAddBlog

  • Home
  • Blogs
  • From Date and To Date in QlikView

This Blog gives the explanation and logic behind how we are using FROM Date and TO Date in QlikView. Usually we use only single date in QlikView. For this we need to select two Calendar objects.


From Date Filter

variable = vFromDate

MinDate =min( all [Transaction Date])

MaxDate =if(vToDate='clr',max( all [Transaction Date]),vToDate)


To Date Filter

variable = vToDate

MinDate =if(vFromDate='clr',min( all [Transaction Date]),vFromDate)

MaxDate =max(all [Transaction Date])


In Qlik we have a bug, when we click on the Clear button it is only clearing the selected options, it won’t clear the variables. So to clear the variable we need to customize the Clear button. For this we need to add the below script.


SET HidePrefix = '_';








Create a List Box for this Clear table.


Setting --> Document properties --> variable select the vFromDate and give the values as clr and select include in bookmarks option, same as for vToDate


Now when we click the CLEAR button in dashboard, we want to clear the value of vFromDate and vToDate variables.


For this we need to do below configurations in Document Properties


Setting--> Document properties --> trigger --> Field Event Trigger  select _Clear field in on select option add action apply bookmark


Setting--> Document properties --> trigger --> Field Event Trigger  select Transaction Date add action onselect and onaction  to set variable for vFromDate ,vToDate



vFromDate=if(GetSelectedCount([Transaction Date])=0,'clr',min([Transaction Date]))

VToDate = if(GetSelectedCount([Transaction Date])=0,'clr',Max([Transaction Date]))


Setting --> Document properties --> trigger --> variable Event Trigger select vFromDate and vToDate add action in oninput and onchange



='>=$(=Date ($(vFromDate))) <=$(=Date ($(vToDate)))'


By the above configuration we can clear both the variables.



Follow Us



Reach Us