Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
uttamdwibedy
Contributor II
Contributor II

Data selection with Date range

Hi, every one, Hope all are working great....!!

Here I want to extract the data by selecting the from date & to date.

For ex. To extract all vessel calls between DD-MMM-YYY to DD-MMM-YYYY.

But while I am adding the calender object & linking the appropriate field (NeedbyDate) It is not coming what I required actually.

Can you help me !!?? Attached the .qvw file I am working on.

1 Solution

Accepted Solutions
Not applicable

See attached for what I think is the solution.

BTW: this post helped me using date selections: http://community.qlik.com/qlikviews/1075

I edited it a few times, because the table returned me all rows when the FROM-date was after the TO date (e.g. from april 2012 to febr 2012). That I tackled with this expression. Perhaps there are better ways to do it...

=

if(From>To,null(),

only({<NeedbyDate={'>=$(=Date(From))<=$(=Date(To))'}>} NeedbyDate))

Hope it helps. I'd like to hear!

View solution in original post

6 Replies
Anonymous
Not applicable

Hi,uttamdwibedy

you create two variables ie vFromDate='01/01/2012' and vToDate ='26/05/2012'

.then in your chart expression you filter the expression like this (

count({<NeedbyDate={'>=$(=(vFrom))<=$(=(vTo))'}>}fieldvalue) .

in front end create an input box fetch these two variable and select the date range.

arunreddy

yvesqlik
Partner - Contributor III
Partner - Contributor III

I have just change the name of Dimension in the chart

abc.jpg

uttamdwibedy
Contributor II
Contributor II
Author

Thanks Arun,

But I want to perform this by two calender objects.

Like one calender will be for from date & another one is for to date.

So that It will be help to extract the report in between dates, & easier to understand , would you help me ?

uttamdwibedy
Contributor II
Contributor II
Author

Sorry guys ,,..!! I have add the wrong qvw.

Pls. check this .qvw . & Pls. kindly suggest me on my pre-said issue ..!!

Not applicable

See attached for what I think is the solution.

BTW: this post helped me using date selections: http://community.qlik.com/qlikviews/1075

I edited it a few times, because the table returned me all rows when the FROM-date was after the TO date (e.g. from april 2012 to febr 2012). That I tackled with this expression. Perhaps there are better ways to do it...

=

if(From>To,null(),

only({<NeedbyDate={'>=$(=Date(From))<=$(=Date(To))'}>} NeedbyDate))

Hope it helps. I'd like to hear!

uttamdwibedy
Contributor II
Contributor II
Author

Yes ,Roberto , implemented well in my model., thanks for your utmost assistance. .....!!