Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

tenyeapen
New Contributor

From Date & To Date Selection

HI Experts

Please help me with the below....please.

I need to create a from date and to date calendar in my sheet. and it has to select the dates from one column in my excel named 'created date.'

Please help.

9 Replies
Shubham_Deshmukh
Valued Contributor

Re: From Date & To Date Selection

Hi @tenyeapen ,

Create 2 variables for from date and to date in Setting->Variable Overview->Add ,

vFromDate= yourDateField

vToDate = yourDateField

Create 2  calendar objects, 1st for from date,

rrrrr.png

and 2nd for to date same like above.

ddd.png

Regards

tenyeapen
New Contributor

Re: From Date & To Date Selection

Hi Boss

I created like above said and the date also showing. But the data on sheet not changing according to from and to dates.

 

Shubham_Deshmukh
Valued Contributor

Re: From Date & To Date Selection

What do you mean by data not matching?
Also, you need to use variables in expression to make them work as daterange for your data.
Have you included them in your expression.
tenyeapen
New Contributor

Re: From Date & To Date Selection

Im very new to this.. so can u please guide me in that?
Shubham_Deshmukh
Valued Contributor

Re: From Date & To Date Selection

For eg : 

 

=Sum({<createdDate={">=$(=vFromDate)<=$(=vToDate)"}>}sale)

 

tenyeapen
New Contributor

Re: From Date & To Date Selection

HI
Still im confused, I have attached the file I have created, can u please check that.
when I select the from date and to date, all the details in the sheet shoul change accordingly.
Shubham_Deshmukh
Valued Contributor

Re: From Date & To Date Selection

I got your requirement, can you please share exact requirement? eg:sum of something or like that.
Sorry I won't be able to open qvw.
Highlighted
tenyeapen
New Contributor

Re: From Date & To Date Selection

I have a sheet of invoice details based on which I created the presentation. In that invoice number, revenue, sales person, created date...etc are there. so by selecting 2 dates I need to show all the details coming in between those dates. Now I have a year field and month field to select the data. Instead of that I need to use this from date and to date option, so that instead of month I can select 2 dates in between.
Shubham_Deshmukh
Valued Contributor

Re: From Date & To Date Selection

Hi @tenyeapen ,

Hoping that you are not doing any aggregation, I think it is direct data you want to show and hope you are using date as dimension.

createdDate, invoice number, revenue, sales person, created date

Dimension : createdDate
Expression for invoice number  : = if(createdDate>=vFromDate and createdDate<=vToDate,[invoice number])
Expression for revenue : = if(createdDate>=vFromDate and createdDate<=vToDate,revenue)
...........

Do the same for all columns, data will get filter.