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: 
Not applicable

Calendar object to pick multiple date types

Hi Guys,


In my data model I have more then 10 different Date Types.

I have created 2 calendar objects to pick 'To' & 'From' dates

What am I trying to do..

I want the Users to chose type of date when they select 'To' & 'From' form the calendar object.

Example:

If user selects date type as 'Delivery Date' then it should only show orders delivered within selected date range.

If user selects date type as 'Shipping Date' then it should only show orders shipped within selected date range.

I have attached sample QVW with sample QVD with sample data set.


About the attached Application..

  • I have created a date link table and then created a master table.
  • Two variables as 'vStartDate' & 'vEndDate' to select min and max date from common date field called 'Date'
  • Every time variable changes, a trigger will make selection in the 'Date' Field in Master Calendar

Thank you in advance for your time, ideas and advice

11 Replies
MarcoWedel

Maybe using dollar sign expansion with a variable or field to switch between date types.

Regards

Marco

marcus_sommer

If you want to switch between different date-fiels you could use dimension-groups and/or some kind of visibility-conditions triggered per selections/variables or buttons.

But have you looked for a way to combine these different date-fields, like in this way: Canonical Date?

- Marcus

MarcoWedel

Hi,

maybe like this:

QlikCommunity_Thread_218312_Pic1.JPG

QlikCommunity_Thread_218312_Pic2.JPG

QlikCommunity_Thread_218312_Pic3.JPG

QlikCommunity_Thread_218312_Pic4.JPG

tabDatTypSelIsland:

LOAD Distinct [Date Type] as DateTypeSelect

Resident DateLink;

hope this helps

regards

Marco

Not applicable
Author

Thank you guys.. I had the hide/show though in mind but I was hoping that someone might have achieved it without having multiple calendar object in the document.

Is it possible in the calendar object to pick date based on date type selection? like using an if Statement in the calendar field ?

marcus_sommer

The suggestion from marcowedel covered exactly what do you asked for.

- Marcus

MarcoWedel

Hi,

like Marcus said, that's what I tried to do.

However, I noticed that Marcus' proposed solution using a dimension group seems to be more straight forward, so you might want to try this as well.

QlikCommunity_Thread_218312_Pic5.JPG

QlikCommunity_Thread_218312_Pic6.JPG

QlikCommunity_Thread_218312_Pic7.JPG

QlikCommunity_Thread_218312_Pic8.JPG

QlikCommunity_Thread_218312_Pic9.JPG

hope this helps

regards

Marco

Not applicable
Author

Thanks Marco,

But I am still confuse about 'To' & 'From' Date

If user selects date type is order date then he should be able to pick a start date and an end date.

So as an example.. User may want to know Order Placed between 01/May/2016 to 20/May/2016 and delivered between 21/May/2016 to 25/May/2016

How can we make selection in field based on two calendar picker?

Anil_Babu_Samineni

Try this for last issue..

=Only({<OD = {'>=05/11/2015<=03/01/2016'}>}OA)


Or else try this reference..


Creating Reference Dates for Intervals

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Use a search expression in your trigger action expression field. Like

>=$(vStartDate)<=$(vEndDate)

Make sure that the replacement values from the two variables correspond to the content of the Date field.

If you want to know the exact expression syntax, try to obtain a from/to range selection in the search field of the Date listbox. Copy that one to the trigger value and replace the date parts with the variable expansions.

Peter