Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I'm fairly sure this is possible I just can't quite get the syntax right. I have a variable input box and the values are dynamic...I need the them to return the following but can't get the syntax right:
'Web', 'App'~Total|Web~Web|App~App
It's the first part that's causing me the issue. I'm essentially trying to replace value in set analysis with what this variable returns but the extra single quotes are causing me no end of problems. The ideal outcome would look like this:
vResultsChannel = 'Web', 'App' or Web or App
Does that make sense?
I actually managed to do it with this:
=Concat('''' & 'Web' & ''''& ', ' & '''' & 'App' & '''')
Which looks a lot dirtier than your suggestion tbh. I think I'll try and swap it for what you've stated.
Can you share sample app to understand how you are trying this, I am sure someone would help better with sample app
Hi @samvile18
If you are having issues for having extra single quotes, try to define them in the variable as ascii characters. Like this:
chr(39)&Web&chr(39)
or this
chr(39)&'Web'&chr(39)
Also, check if maybe you need double quotes in the set analysis where the variable is being set.
As previously replied, if you provide a sample app, we will be able to better guide you since we will better understand your expressions.
Kind Regards
Daniel
I actually managed to do it with this:
=Concat('''' & 'Web' & ''''& ', ' & '''' & 'App' & '''')
Which looks a lot dirtier than your suggestion tbh. I think I'll try and swap it for what you've stated.
How do I create a sample qvf? That would help on almost everything I post here!
If this is about creating a measure that works based on input provided by a Qlik user in an input box, where the value is stored or passed through a variable, and the values Web and App are present in a table column, then you can use the following two approaches:
pick(match(vVariableResult, 'Total', 'Web', 'App'), sum(sales), sum({<channel={'Web'}>} sales), sum({<channel={'App'}>} sales))
sum({<columnName={'$(vVariableResult)'}>} sales)
if it not worked give some additional information about what you want.