Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Sequential selects

Dear All,

I'm still learning, but I would appreciate help on this. I have a month number table (which I need to index the data):

Map_Period:

LOAD * INLINE [
Period, PerDesc
01, Jan
02, Feb
03, Mar
04, Apr
05, May
06, Jun
07, Jul
08, Aug
09, Sep
10, Oct
11, Nov
12, Dec
]
;

PerDesc is now a selection list box, showing the moths. How do I enforce a click where, for example, you select 'Aug', and every month up to (and incuding) 'Aug' is selected? Having trolled the discussions, I have not found anything that works!

1 Solution

Accepted Solutions
MVP
MVP

Re: Sequential selects

I can suggest 2 possible solutions, both assuming that you have 2 separate fields - Month and PerDesc

1. Using Actions. You can use "OnSelect" trigger for the field PerDesc, and enforse a selection in the field Month every time the user selects or changes PerDesc. You may need to tinker with the field format, but generally, this is the direction.

2. Using a data modelling technique that I'm calling "as of date", where you create a linking table for the two Month Fields, and you associate a number of Months with each corresponding PerDesc. So, for example, if clicking on March needs to trigger a selection of Jan, Feb and March, then in your table you need to associate Months Jan, Feb and March with PerDesc = March.

For example:

Month     PerDesc

Jan          Jan

Jan          Feb

Feb          Feb

Jan          Mar

Feb          Mar

Mar          Mar

...

In this case, when PerDesc Mar gets selected, all three associated months will be "selected" (or rather associated with your selection).

My personal preference is the second solution because it's using QlikView associative logic and not triggers and actions and other "pyrotechnics".

best,

Oleg Troyansky

4 Replies
MVP
MVP

Re: Sequential selects

I can suggest 2 possible solutions, both assuming that you have 2 separate fields - Month and PerDesc

1. Using Actions. You can use "OnSelect" trigger for the field PerDesc, and enforse a selection in the field Month every time the user selects or changes PerDesc. You may need to tinker with the field format, but generally, this is the direction.

2. Using a data modelling technique that I'm calling "as of date", where you create a linking table for the two Month Fields, and you associate a number of Months with each corresponding PerDesc. So, for example, if clicking on March needs to trigger a selection of Jan, Feb and March, then in your table you need to associate Months Jan, Feb and March with PerDesc = March.

For example:

Month     PerDesc

Jan          Jan

Jan          Feb

Feb          Feb

Jan          Mar

Feb          Mar

Mar          Mar

...

In this case, when PerDesc Mar gets selected, all three associated months will be "selected" (or rather associated with your selection).

My personal preference is the second solution because it's using QlikView associative logic and not triggers and actions and other "pyrotechnics".

best,

Oleg Troyansky

Not applicable

Re: Sequential selects

Thanks, Oleg.

I couldn't get the trigger-type mechanism to work cleanly, but the table mechanism works and it is elegant.

John B

MVP
MVP

Re: Sequential selects

John,

you are very welcome. Your question pushed me off the fence, and I wrote a blog post about it:

http://www.naturalsynergies.com/q-tip-4-how-to-use-as-of-date-table/

best,

Oleg Troyansky

Not applicable

Re: Sequential selects

Thanks - added to my Favourites!

JB

Community Browser