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

Set Analysis - Variable

Hello

I have defined a variable as

=(Count({<NumberOfParks={">=$(threshold)"}>}NumberOfParks))

It counts the number of times a field 'NumberOfParks' has crossed a threshold value. Right now it takes into consideration the complete set of Dimension (Years in this case). How can I restrict my variable to consider only a subset of data and then compute the count of NumberOfParks? What will be the Set Analysis Expression for this variable?

Please find attached the sample. Variable I'm talking about is 'counter'. I want counter to consider only Years till 2002 and leave the Year '2003' from consideration for calculating NumberOfParks.

Thanks!

1 Solution

Accepted Solutions
giacomom
Partner - Contributor III
Partner - Contributor III

Hi Nishant,

you can use the following expression:

=(Count({<Years = {"<=2002"}, NumberOfParks={">=$(threshold)"}>}NumberOfParks))


You can add filters to other fields just comma-separating them between the < > brackets.


Regards,


Giacomo

View solution in original post

1 Reply
giacomom
Partner - Contributor III
Partner - Contributor III

Hi Nishant,

you can use the following expression:

=(Count({<Years = {"<=2002"}, NumberOfParks={">=$(threshold)"}>}NumberOfParks))


You can add filters to other fields just comma-separating them between the < > brackets.


Regards,


Giacomo