Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
tenyeapen
Contributor
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
Specialist
Specialist

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
Contributor
Contributor
Author

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
Specialist
Specialist

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
Contributor
Contributor
Author

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

For eg : 

 

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

 

tenyeapen
Contributor
Contributor
Author

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
Specialist
Specialist

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.
tenyeapen
Contributor
Contributor
Author

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
Specialist
Specialist

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.