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

Need to change date filter based on the List Box Selection

Hi Qlik Experts,

We came across the below scenario, kindly help us to implement this logic.

We are having one list box selection with the following values like

PreviousDay,Last3Days,Last7Days,Last15Days,Last30Days,MTD,YTD,QTD ...etc

Also we are having one filter pane with the Date Field as a filter.

When the user clicks the MTD Filter, the entire report should filter only for the MTD Selection.

Please help us in achieving this. Also kindly share any expressions to relate the filter and the list box selection.

Thanks in advance..!

Thanks,

Dinesh

2 Replies
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Dinesh,

Please create inline table  like below:

DATEFILTER:

Load * Inline [

_DATEFLAG

PreviousDay

Last3Days

Last7Days

Last15Days

Last30Days

MTD

YTD

QTD];


Write expression like  if(_DATEFLAG=PreviousDay, Datte= max Date()-1......


Thanks,

Arvind Patil

dineshkumar_e
Contributor II
Contributor II
Author

Hi Arvind,

Thanks for your reply.

As mentioned i already created an inline table for the list box and wrote the expression for the Dynamic Date filter.

but when i selected the list box, date filter is not refreshing automatically and also the values in the dynamic date filter also not showing properly, it is showing something in integer.

Please guide me if i did anything wrong.

Below is the expression I used for my Dynamic date filter.

=if([%Period_Type]='PD', Date=Date(Num(Today()-1)),

Date)

Below is my ListBox and Dynamic Date Filter:

ListBox_DateFilter_Screenshot.JPG

Thanks,

Dinesh