Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Select all Previous Months in Listbox

Hello I have the following question.

I have a listbox were i select a month in a certain year, i.e.

Month: 1   2     3     4     5.. etc.

My datamodel is made in a way that it requires the user to select all the months to see the balance at the end of that month. So to see the balance at the end of march, he has to select:

Month: 1      2     3     4     5    6.. etc

Is there a way that upon selecting just march, the first 2 months will be automaticly selected?

Tags (1)
1 Solution

Accepted Solutions

Re: Select all Previous Months in Listbox

Hi Willem,

you might also create a selector table, which contains a selector field (e.g. MonthSelector) that links to all months less or equal the MonthSelector value.

regards

Marco

QlikCommunity_Thread_110282_Pic2.JPG.jpg

QlikCommunity_Thread_110282_Pic3.JPG.jpg

QlikCommunity_Thread_110282_Pic4.JPG.jpg

QlikCommunity_Thread_110282_Pic5.JPG.jpg

tabData:

LOAD

  Ceil(RecNo()/10) as Month,

  Round(Rand()*100) as Data

AutoGenerate 120;

tabTemp:

LOAD Month as MonthSelector Resident tabData;

Join

LOAD Month Resident tabData;

NoConcatenate

tabMonthSelector:

LOAD

  Month,

  MonthSelector

Resident tabTemp

Where Month <= MonthSelector;

DROP Table tabTemp;

6 Replies

Re: Select all Previous Months in Listbox

Don't know if that is possible or not but as an alternate solution..

you can create a button named Select Month and add an action

Select In Field

Field

Month

Search String

='<=$(=Max(Month))

Now once you select any Month and click on that button.

It will select all previous + your selected months.

Hope this helps.

Not applicable

Re: Select all Previous Months in Listbox

Thank you for your reply.

That would be possible, but I am really looking for a way to skip this extra step. I was hoping there was an easy solution for this.

Not applicable

Re: Re: Select all Previous Months in Listbox

I did something similar to Manish's reply. I created an input box which would select all the numbers less than and equal to the input value. If user inputs 5 then 1 to 5 would be selected in the list box.

Another suggestion: You can use set analysis in this balance calculation such that it will include all months <= selected month instead of selecting all months in the list box.

Thanks

AJ

MVP
MVP

Re: Select all Previous Months in Listbox

instead of a button add a document trigger (field event trigger) on field Month

On Select --> Select in Field

Field                         Month

Search String          ='<=$(=Max(Month))'

the user will select a month and all previous month (and selected too) will be selected

hope it helps

Re: Select all Previous Months in Listbox

Hi Willem,

you might also create a selector table, which contains a selector field (e.g. MonthSelector) that links to all months less or equal the MonthSelector value.

regards

Marco

QlikCommunity_Thread_110282_Pic2.JPG.jpg

QlikCommunity_Thread_110282_Pic3.JPG.jpg

QlikCommunity_Thread_110282_Pic4.JPG.jpg

QlikCommunity_Thread_110282_Pic5.JPG.jpg

tabData:

LOAD

  Ceil(RecNo()/10) as Month,

  Round(Rand()*100) as Data

AutoGenerate 120;

tabTemp:

LOAD Month as MonthSelector Resident tabData;

Join

LOAD Month Resident tabData;

NoConcatenate

tabMonthSelector:

LOAD

  Month,

  MonthSelector

Resident tabTemp

Where Month <= MonthSelector;

DROP Table tabTemp;

Not applicable

Re: Select all Previous Months in Listbox

works perfect! thanks!

Community Browser