Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filtered List Box

Hi,

I have a requirement were I need to show the last 6 dates in a list box. I have tried to display the same using a formula as below  theList Box.jpg

The expression is as below:

Expression.jpg

but this does not appear to be producing the expected results. I am just getting an empty list box.

Please suggest.

10 Replies
tresesco
MVP
MVP

Try like:

If([Run Date]>$(=Max([Run Date],7)), [Run Date])

Not applicable
Author

Thanks Mate, but that doesn't seem to work and gave me the entire list of dates.

Not applicable
Author

Let me elaborate, what I am trying to do.

1. I have a Start and End Date list box that is shown on the dashboard

2. I am trying to add another list box that shows last 6 dates. This list box will serve as a guide to select the start and end dates. This should also not be filtered or affected by other fields hence its in a different 'state'.

tresesco
MVP
MVP

Perhaps your date field is not properly formatted(numeric at the backend). Try: =Max([Run Date]) in a text box. Do you get a number?

Not applicable
Author

Hi,

try with a variable

vDateMax:

=Date(Max(Fecha)-7)

And the follow expression:

=Date(IF(Fecha>=vDateMax,Fecha))

With this method you can change the number of days easy.

krishna20
Specialist II
Specialist II

Hi Try This

=aggr(only({<Run_Date={'>=$(=$(=vMaxRun_Date)-5)<=$(=vMaxRun_Date))'}>} Run_Date),Run_Date)

Variable->vMaxRun_Date =Max({1}Run_Date)

Regards

Krishna

Not applicable
Author

Thanks for the help but that didn't work either

Not applicable
Author

Tresesco, I am getting a date back

Not applicable
Author

Hi,

Try This

AGGR(if(Date>=$(=Max(Date)-7) and Date<= $(=Max(Date)),Date),Date)

OR

=AGGR(ONLY({1<Date={'>=$(=Max({1}Date)-7)<= $(=Max({1}Date))'}>}Date),Date)

Regards

Nandkishor Pandirkar