Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Set Analysis Based on Selection

Is it possible to have a set analysis expression that is based on a selection in a table?

=COUNT({$<Author={"Criteria From Selection"},}>}[Author])

6 Replies
sibusiso90
Creator III
Creator III

Yes you can.

here are examples below from the qlik reference guide

Synchronizing Selections between States

Example:

The following expressions can be used in a single chart:

count({$} DISTINCT [Invoice Number])

count({State1} DISTINCT [Invoice Number])

count({State2} DISTINCT [Invoice Number])

There is a problem with this method; the QlikView Developer must duplicate the selections (list boxes and

multi boxes) for all three states so that the end-user can make appropriate selections for the various states. In

many situations the QlikView Developer will want to have a set of ‘common’ selections available to all

states. This will allow the end user to set the context for the various charts and then make use of specific

selections to show the differences between states. Set Analysis can be used with states to keep certain selections

consistent between states.

Example:

count({State1<Year = $::Year, Month = $::Month>} DISTINCT [Invoice Number])

count({State2<Year = $::Year, Month = $::Month>} DISTINCT [Invoice Number])

The QliKView Developer will keep the Year and Month selections in State1 and State2 synchronized

with the Year and Month selections in the default state. The QlikView Developer can add

elements to the set modifiers as necessary in order to keep even more fields consistent between states.

Kind Regards

Sibusiso Phumelo

Anonymous
Not applicable

Hello Evan,

Try this:

=COUNT({$<Author={$(=GetFieldSelections([Yours_Field]))}>}[Author])


Yours_Field - change that name on yours


Regards

Jacek.

evansabres
Specialist
Specialist
Author

Unfortunately, I could not get this to generate any results, however may be due to how my data is established.

Anonymous
Not applicable

Could you send a sample of your data?

evansabres
Specialist
Specialist
Author

I think my data structure is flawed, will revisit that before I move on

praveen_prithiviraj
Contributor III
Contributor III

=COUNT({$<Author={"Criteria From Selection"}>}[Author])

Kind Regards,
Praveen Kumar. P