Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create calendar for start date and end date

Hi,

I have 2 fields ,start date and completion date.When i select jan as the start date and then July as the end date then i should get projects within that range.

I have tried the below:

1)Tried creating 2 variables min and max

=vminstartdate and vmaxenddate

2)Created 2 calendar objects in the front end

1st object is Startdate:

variable name :vminstartdate

min value = min(startdate)

max value= max(start date)

2nd object is end date

variablename: vmaxenddate

min value = min(end date)

max value = max(end date)

How ever when i select the dates the dates are coming in number format and also the data is not reflecting properly . pls help to resolve this

1 Solution

Accepted Solutions
Not applicable
Author

=Concat({<Startdate = {">=$(vstartdate)"}, Enddate = {"<=$(venddate)"}>} DISTINCT Name,' |')

View solution in original post

6 Replies
shraddha_g
Partner - Master III
Partner - Master III

try

min value = date(min(startdate))

Not applicable
Author

Thanks Shraddha.I got the date value when i changed the number format to date in the calendar object.Could you pls let me know when i select the start date and the end date i need to get the data reflected accordingly in a chart.how do i achieve this?

I am trying to give the expression in the chart as below

Sum(if([End Date]>=$(vminStartDate) AND [Start Date]<=$(vmaxEndDate),[QP Count])) but unable to achieve it correctly

dineshm030
Creator III
Creator III

Hi Rekha,

Try This:


sum( {<[End Date]={">=$(vminStartdate"},[Start Date]={"<=$(vmaxEndDate"}>} [QP Count])


sum( {<[End Date]={">=$(vmaxEndDate"},[Start Date]={"<=$(vminStartdate"}>} [QP Count])


Regards

Dinesh

jonathandienst
Partner - Champion III
Partner - Champion III

Is your logic correct? This should then work:

=Sum({<StartDate = {">=$(=vmaxEndDate)"}, EndDate = {">=$(=vMinStartDate)"}>} [QP Count])

Do the two fields and the two variables have the same date format?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

=Concat({<Startdate = {">=$(vstartdate)"}, Enddate = {"<=$(venddate)"}>} DISTINCT Name,' |')

Not applicable
Author

Thank you all for helping in resolving the issue.Now am able to get the desired result using the expression provided by X mg.