Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
SamuelHaag
Contributor III
Contributor III

Set analysis/variables - Aggregation function as a variable parameter

Hello,
I try to build a variable/function (called "vLimiterFunction") that limits  the value of a given parameter ($1) while keeping null-values:

if(isnull($1),null(),rangemin(rangemax($1,$(vMinPercentage)),$(vMaxPercentage)))

- The rangemin and rangemax functions at the end are used to limit the value of $1
- The if condition with isnull() makes sure that nullvalues() will remain as null-values, since rangemin() and rangemax() will turn them into false values
- With $1 I want to give the variable a set analysis aggregation function

In the set analysis I recieve the following error - I guess the variables in the given parameter $1 are the problem:

Qlik Sense limiting values.jpg

 

Maybe someone can help me on this to get the syntax right or has another solution to limit values while keeping null-values

 

Thank you

 

Best regards 

 

Samuel

 

 

Labels (3)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

We cannot have comma's  (,)  in the parameter passed

the variable vStandardFilter seems to have more than one criteria   which is why it only returns the first delimited value and your expressions fails to evaluate after that point 

refer below

https://community.qlik.com/t5/Documents/Variables-with-Parameters-when-the-value-has-a-comma-quot-qu...

https://community.qlik.com/t5/New-to-Qlik-Sense/Variables-with-parameters/td-p/93454

https://community.qlik.com/t5/QlikView-App-Dev/Variable-Arguments-containing-comma/m-p/924428

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

We cannot have comma's  (,)  in the parameter passed

the variable vStandardFilter seems to have more than one criteria   which is why it only returns the first delimited value and your expressions fails to evaluate after that point 

refer below

https://community.qlik.com/t5/Documents/Variables-with-Parameters-when-the-value-has-a-comma-quot-qu...

https://community.qlik.com/t5/New-to-Qlik-Sense/Variables-with-parameters/td-p/93454

https://community.qlik.com/t5/QlikView-App-Dev/Variable-Arguments-containing-comma/m-p/924428

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
SamuelHaag
Contributor III
Contributor III
Author

Thank you for the quick reply and the references!