Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
hroscelli
Contributor
Contributor

Advanced Filtering

I created a GREAT report where everything filters off today's date. This filtering is not applied via a selection from the filter pain. Instead, I use Today() in my formula (and exclude null values) to filter to what I want to see. Here is the formula.

=if(daystart(PREVIOUS_DATE)=daystart(today()) OR daystart(CURRENT_DATE)=daystart(today()),
FLOOR(TRH_DATE_MODIFIED)-DAYSTART(TODAY())  <--this formula serves as both and a useful filter looking at two different fields and also tells me how many days since the record was modified.

My problem is that I would like to update my report, so that instead of using TODAY() in the above formula, I am using a selected date.  New formula would look something like this:

=if(daystart(PREVIOUS_DATE)=daystart(SELECTED_DATE) OR daystart(CURRENT_DATE)=daystart(SELECTED_DATE),
FLOOR(TRH_DATE_MODIFIED)-DAYSTART(SELECTED_DATE)

The filter pane, however, wants me to make a selection off single field selection.  I need to filter off a date that is located in one OR the other column....and then also use that same selected date to find the date difference between TRH_DATE_MODIFIED and the "SELECTED_DATE".  I cannot just use the PREVIOUS_DATE as a filter or the CURRENT_DATE as a filter because it will not bring in all the desired records and also would not consistently give the correct formula results. I would love it if I could just type in a free text date in the filter pane (or select a date from a drop-down that is unlinked to the table), and that date would just populate into my formula...but that does not appear to be an option with Qlik Sense.  Does anybody know of a solution to this?  This will be such a useful report if I could get it to work.

Labels (2)
0 Replies