Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ciaran_mcgowan
Partner - Creator III
Partner - Creator III

Make Selection based on Date in another table

Hi,

I have 2 tables, Department & Sales that look like this:


Department

DepartmentEmployeeStartDateEndDate
CounterPaul01/02/201323/12/2013
CounterRingo17/06/2011Present
CounterJohn24/11/201011/03/2014
SalesGeorge03/08/201228/12/2012
SalesBrian11/06/2013Present
SalesChuck21/10/201228/02/2013

Sales

DepartmentSaleIDSaleDescSaleDateSaleAmount
Counter135Watch21/07/20121000
Sales203Neck10/01/20142050
Counter107Wed Ring15/04/20117000


When a selection is made like Watch, all the Department employees for Counter are displayed. Is there any way to only show the employees that were working in a department at the time the item was sold (in this case John & Ringo)? ie. if the SaleDate>=StartDate AND (SaleDate<=EndDate OR SaleDate='Present')


Thank you.

0 Replies