Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

change listbox using calendar

Hi,

i have:

1. Listbox Object with dates

2. Calendar Object for choose 1-st date in period

3. Calendar Object for choose last date in period

I want choose 1-st and last date in period. When i choose period i want to see in Listbox Object only dates in period with condition:

(date >= 1-st date in period and date <= last date in period)

and they must be already selected

please help

1 Solution

Accepted Solutions
MVP
MVP

Re: change listbox using calendar

Your actions select all possible dates.  Just because your list box doesn't display them doesn't mean they aren't selected, which you could see by making a date list box.  Instead of selecting possible, you need to select with a search string like this:

='>=$(=date(nach_p,'YYYYMMDD'))<=$(=date(konec_p,'YYYYMMDD'))'

You could remove the 'YYYYMMDD' codes if you formatted your dates consistently with the SET DateFormat in the script.  You're not restricted to only the YYYYMMDD format here.

8 Replies
thomas_skariah
Contributor III

Re: change listbox using calendar

Hi,

Is this date in YYYYDDMM?

Regards,

Tom

Re: change listbox using calendar

See attached qvw. If you explicitly format the dates as dates in YYYYMMDD format it works.


talk is cheap, supply exceeds demand
Not applicable

Re: change listbox using calendar

Hi, Tom

yes

Not applicable

Re: change listbox using calendar

Hi,

this is what i need!

 

And is it possible to set selected all dates in this listbox?

Re: change listbox using calendar

Yes, in the document properties screen you can add triggers for the OnInput actions of the variables. If you set the action to Select Possible for field date then if you pick another date in one of the calendars the selection will change too.


talk is cheap, supply exceeds demand
Not applicable

Re: change listbox using calendar

it is working, but my table does't changing.

listbox does changing, but table Count (otvetstv) not.

why? if i manualy select some value in listbox, table also changing.

MVP
MVP

Re: change listbox using calendar

Your actions select all possible dates.  Just because your list box doesn't display them doesn't mean they aren't selected, which you could see by making a date list box.  Instead of selecting possible, you need to select with a search string like this:

='>=$(=date(nach_p,'YYYYMMDD'))<=$(=date(konec_p,'YYYYMMDD'))'

You could remove the 'YYYYMMDD' codes if you formatted your dates consistently with the SET DateFormat in the script.  You're not restricted to only the YYYYMMDD format here.

Not applicable

Re: change listbox using calendar

Thank you, John!

Now it is work perfectly!

Community Browser