Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SET ANALISYS

Hi all,

I have a problem with the set analisys expression. I would like, for example, to count all my items and the total should not change when selecting other fields except one field.

To get a total count I made:

Count ((1) TABLE1.ITEM)

If I write:

Count (() <YEAR> TABLE1.ITEM)

The count will never change if I select the YEAR field. But I would like to count only change by selecting the field YEAR.

Thanks, Capetto

1 Solution

Accepted Solutions
martin59
Specialist II
Specialist II

Hello,

You can try this :


Count ({1<Year=P(Year)>} TOTAL TABLE1.ITEM)


View solution in original post

5 Replies
villafuerte
Partner Ambassador
Partner Ambassador

Hi Luca,

If you want a table to stay fixed you can use {1}, for example:

Count({1} Field)

If you want all the fields to stay fixed but you want also to change the year, yo can specify this in the Set Analysis as well:

count( {1 < Year={'2010'} >} Field)


You can use a selection or a variable instead of the 2010.

Hope it helps!

martin59
Specialist II
Specialist II

Hello,

You can try this :


Count ({1<Year=P(Year)>} TOTAL TABLE1.ITEM)


villafuerte
Partner Ambassador
Partner Ambassador

Hello,

I made a simple example of this syntax. Maybe it can help you!

martin59
Specialist II
Specialist II

Look at the attached file.

Martin

Not applicable
Author

Thank you very much. It works fine 😉