Qlikview Capture ListBox Selections

I am working on a Qlikview application to analyze fantasy football statistics.  A common practice is comparing player stats, trying to determine which player to draft, start or pickup on your roster.  In many cases, I select multiple players from a ListBox and display them in various charts, in order to compare their statistics over a chosen period of time.

I was looking for a way display selected players above the charts.  I started to play around with a couple functions in Qlikview and found a simple solution that accomplished what I was looking for.

Using the GetFieldSelections function, I was able to capture ListBox selections for display in a Text Object.  This was perfect for what I wanted to accomplish, and I thought I would share how to set this up.

Setup

Here are the steps to accomplish this task:

Setup a Text Object, then go into the properties so you can modify the Text display and add the following function:

Qlikview Capture ListBox Selections

This is the simplest form of the function GetFieldSelections, and I have a ListBox for field “Player”.  I selected the following values in my ListBox:

Qlikview Capture ListBox Selections

Here is how the Text Object looks after the selections are made:

Qlikview Capture ListBox Selections

If you select more than 6 items in the ListBox, your display will look like the following:

Qlikview Capture ListBox Selections

You can easily fix the function setup in order to display all selections, up to a maximum number specified.  Go back into the properties of the Text Object, and update the function:

Qlikview Capture ListBox Selections

Adding the two additional parameters allows you to choose the separator and how many selections to display.  In the updated function above, I chose to use a comma ‘, ‘ as the separator (this is the default value as well), and maximum display of 10 selections.

When I choose 10 players in the ListBox:

Qlikview Capture ListBox Selections

All ten players will now display in my Text Object:

Qlikview Capture ListBox Selections

In the final example below, I added the pipe ” | ” as the separator, and included some text before the function to customize the Text Object display.

 

Qlikview Capture ListBox Selections

Conclusions

Using this technique, you can display the selected players in the header of the chart, helping users identify exactly which players are part of the analysis.

 

Additional Content

Check out more examples by visiting my Home Page

Here you will find topics covering  Qlikview  SQL Server  Excel VBA

 

Leave a Comment