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

Days from date field value filter

I've been struggling with a requirement for a couple of weeks now that I can't seem to get right. It seems like it should be a simple one, but I'm not getting the results I'm looking for.

I have a date field in my data set called DISCHARGE_DATE, and another called ADMIT_DATE. I want to create a filter like "10 days, 20 days, 30 days, est..." that will filter for all admit dates occurring within those days of a DISCHARGE_DATE. Where I'm at now:

=if(ADMIT_DATE<=date(DISCHARGE_DATE,+10),'10 Days',if(ADMIT_DATE<=date(DISCHARGE_DATE,+20),'20 Days',''))

0 Replies