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

Formula in listbox to create a bookmark

I want to create a formula in a listbox to select the previous month.

In another QV document, I do the following in the SEARCH field for the OnDate listbox:

=OnDate=FirstWorkDate(today()-1,1)   , and this works fine - it returns the previous work day. I save it as a bookmark "Yesterday",

and use that to select the report parameters when I send it through nPrinting.

Now, I want to get the previous month from "ActMonth", so I tried:

=ActMonth=AddMonths(today(),-1,1)  <- doesn't work, returns all months

=ActMonth=Month(today())-1  <- doesn't work, returns all months

Created a variable: Date(today(),'MM/DD/YYYY') which matches our script's date format. Tried

=ActMonth=Month($(vToday))-1  <- doesn't work, returns all months

=ActMonth=Month(vToday)-1  <- doesn't work, returns all months

This has to be dirt simple, but I can't figure out why it's not working.

Can anyone assist?

Thanks

2 Replies
madsgrathe
Partner - Creator
Partner - Creator

I have this exact same problem.

HOWEVER: I can get the listbox search to work when there is no selection already made. But if selections are made prior to the listbox search, the search formula won't work...

Is this a bug?

rustyfishbones
Master II
Master II

Hi,

try

=MONTH(AddMonths(today(),-1))