Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using dual() in a listbox issue with checkboxes

Hello,

I am using dual() in an expression for a list box as follows:

=if(DATE([Actual / Forecast Date],'MM/DD/YYYY')<Today(),dual('Past Due',1),
if(DATE([Actual / Forecast Date],'MM/DD/YYYY')>=Today()
and month(DATE([Actual / Forecast Date],'MM/DD/YYYY'))=month(Today())
and year(DATE([Actual / Forecast Date],'MM/DD/YYYY'))=year(Today()),dual('Due This Month',2)))

I want the user to be able to select one or the other or both of the two options using Windows checkboxes. The issue is that the first option ('Past Due') performs correctly so the field does filter to only show Past Due items but the checkbox does not stay checked. (see image below) The second option (Due This Month) works correctly and stays checked. Any idea what causes this or how to fix it? I have another list box just like it that does the same thing. Four of the five options work correctly and stay checked and the fifth option does not - it filters correctly but the box does not stay checked. This is more an aesthetic issue than a functional one but it is misleading to the user and since it does not stay checked, you cannot uncheck it to remove the filter. Any help is appreciated. Thanks!

Capture.PNG

2 Replies
MarcoWedel

create your 'Past Due' and 'Due this month' values in an additional field in your script.

hope this helps

regards

Marco

MarcoWedel

maybe like this:

QlikCommunity_Thread_192625_Pic5.JPG

QlikCommunity_Thread_192625_Pic4.JPG

QlikCommunity_Thread_192625_Pic2.JPG

QlikCommunity_Thread_192625_Pic3.JPG

  If([Actual / Forecast Date]<Today(),Dual('Past Due',1),

      If(InMonth([Actual / Forecast Date],Today(),0),Dual('Due This Month',2))) as [Actual / Forecast Type];

QlikCommunity_Thread_192625_Pic1.JPG

hope this helps

regards

Marco