Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
tabletuner
Creator III
Creator III

Listbox ignoring selections

Hi Guys,

My customer has a report in which the collection listbox needs to ignore the year selection.

Instead, the collections listbox needs to show all collection values of the sales that happened the past 2 years.

I included an example in this post.

Hope someone can help me out.

Regards,

Tjeerd

9 Replies
Not applicable

Hi mr Wieberdink ;-),

When using Qlikview 10, maybe you can do something with the possibility to use an expression in a listbox. http://community.qlik.com/wikis/qlikview10/list-box-expressions.aspx

When using version 9, I don't know if there is a solution for this in the front end. Maybe create a new collection field and find a solution in script (eg let collection values have relationsship with last 2 years)?

Not applicable

Hi,

I think that you need to return this values in your script, because you select year 2010 and all record in your document are associate for this values.

Maybe you need to create a temporary table and concatenate with the actual table where your field corresponding a data for last year. You need to create as flag to decribe a last data and actual data.

Ex.:

Table_Actual:

Article, Collection, Sales, Year, Type
A, 100, 10, 2009, Current_data
A, 200, 20, 2010, Current_data

CONCATENATE

New_Table:

Article, Collection, Sales, Year, Type
A, 100, 10, 2009 + 1, Last_data
A, 200, 20, 2010 + 1, Last_data

Your table result:

Article, Collection, Sales, Year, Type

A, 100, 10, 2009, Current_data
A, 200, 20, 2010, Current_data
A, 100, 10, 2010, Last_data
A, 200, 20, 2011, Last_data

tabletuner
Creator III
Creator III
Author

Hi Eduardo,

You solution works. I just tested it with qv 10. However, your solution increases the size of the fact table by factor 2. I am afraid this cannot be avoided.

Thanks for the effort.

Regards,

Tjeerd

tabletuner
Creator III
Creator III
Author

@William83,

QV 10 offers a lot more opportunities for list boxes indeed. I think i need a set analysis in my listbox (like {$<Year={vThisYear,vLastYear}>} but i cant figure out which aggregation function should accompany this set analyss statement to be appropriate for my problem.

Thanks for the help anyaway!

Regards,

Tjeerd

mov
Champion III
Champion III

Tjeerd,
As a rule, you aggregate the field by itself in cases like this. For example, if a list box "MyField" should be independent from Year selection, I'd do it this way:
aggr(only({$<Year=>} MyField), MyField)

tabletuner
Creator III
Creator III
Author

Michael,

I used your example in the attached file. Do you know why i cant get it to work?

Besides, the list shouldnt be independent but it should show collections from CURRENT and PREVIOUS year.

I hope you can help me out.

Regards,

Tjeerd

mov
Champion III
Champion III

Keep forgetting that list boxes are different... Tongue Tied

See attched, this is the closest to a listbox I could do.

Not applicable

Hi Tunner,

I am also having the same problem.

If you found the solution for that please send me with the sample attachment file.

Thanks.....

nagaiank
Specialist III
Specialist III

I am not sure if I understood the problem.

Try the following:


- Check 'Show all values' for all dimensions in the 'Dimensions' tab of Chart properties

- Uncheck 'Suppress Zero values' and 'Suppress Missing' in the Presentation tab.

This will display both the collections in your example for any year selection in the listbox.