Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
akile002
Contributor
Contributor

Can I select one year from two different date fields?

My problem is that I have two dates. I have a Hire Date and a Termination Date. I want to be able to select one year and pull up the Hire count and Termination count. Is there a way to combine the two to be able to select one year?

4 Replies
jonasheisterkam
Partner - Creator III
Partner - Creator III

You can use on select trigger from on one of the fields to select the other. You find it in Document Settings Actions. Better is to connect them in data model if possible.

Can you attach a small example qvw.

MayilVahanan

HI

You can create a master calendar and use tat.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable

Hi...

You can create a Master Calendar having all the dates and then join it with the Hire Date and Termination Date in the script.

And then use the date from the Master Calendar..

For Tips to create a Master Calendar refer the link by @Josh Good:

http://community.qlik.com/thread/48693

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The best way to do this is to use one of the year fields in the list box, and link the other year using a set expression. Assuming you use [Hire Date] in the list box:

     Hire Count = Count(EmployeeID)

     Termination Count = Count({<[Termination Date] = P([Hire Date])>} EmployeeID)

Or you could use a Date island (another date field not connected to the rest of the model):

     Hire Count = Count({<Hire Date] = P([Island Date])>} EmployeeID)

     Termination Count = Count({<[Termination Date] = P([Island Date])>} EmployeeID)

HTH

Jonathan

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