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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
victor95
Partner - Contributor
Partner - Contributor

Expression with more than one set analysis filter passed to a variable as a parameter not working

Hi guys.

First of all, this is my first post, so I hope I am posting it the right place. 

Qlik Sense allows you to pass parameters to variables, which is great. There is an example on how it works:

let sum = $1+$2
in: $(sum(1,3))
out: 4

Equivalently, one can pass expressions to a variable. This is usefull when dealing with formats. 

let format = if(Fabs($1)<1,num($1,'0,0%'),num($1,'#.##0'))

The expression above apply percentage format to parameters that are less than 1.

An example on how to use it could be

$(format(sum( Sales )))

Or even

$(format(sum({<Country={'Spain'}>} Sales)))

The problem cames when trying to pass more than one set analysis filter, as in 

$(format(sum({<Country={'Spain'},Year={'2018'}>} Sales)))

In this last case, as there is a comma in the expression (separing the Country and Year filters), the variable understands that two parameters are being passed.

I mean, when passing this parameter, the variable is understanding that

$1 = sum({<Country={'Spain'}

$2 = Year={'2018'}>} Sales))

How could I tell Qlik Sense that this comma is not meaning parameter separation? I have tried concatenating, using parenthesis...

Thank you in adavance! Cheers! 

Labels (3)
1 Reply
sunny_talwar
MVP
MVP