Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
megasupermoon
Contributor III
Contributor III

How to select dates between START_DATE and END_DATE fields with one Date Picker

Hello,

I have Pivot Table that have medication information with PATIENT_ID, START_DATE, MEDICINE_NAME,  MEDICINE_POTENCY and EXPIRATION_DATE.  There's also Date Picker, and when the user selects date range,  the report should show only those medications that  are valid within selected date range. For now Date Picker gives medications  whose START_DATE is within selected date range, regardless of whether the medications have expired or still valid. 

How to make the report and Date Picker work as desired or is it even possible? Is this done with code/query or in the report side?

Thanks for advance!

1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

Try this 

SUM({$<START_DATE = {"<=$(=Max({1} START_DATE))"}, EXPIRATION_DATE = {">=$(=vSelectedDate)"}>} MEDICINE_POTENCY)

 

View solution in original post

1 Reply
Chanty4u
MVP
MVP

Try this 

SUM({$<START_DATE = {"<=$(=Max({1} START_DATE))"}, EXPIRATION_DATE = {">=$(=vSelectedDate)"}>} MEDICINE_POTENCY)