Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a set expression as follow:
'$(=only({<adjustment_category_pss={'All entries (DEIMGs, college , school, residency ) cosmic'}>} column))'
I know this will work:'$(=only({<adjustment_category_pss={'All entries DEIMGs return from abroad medical school residency seats'}>} column))'
How can I ignore the commas in this set expression?
please try KeepChar() function
The set expression has no problem with commas within of string-values. If it's not working it's caused from the way the expression is used - probably as parameter or within another variable. The most simple approach would be to skip these logic and not using variables for this use-case.
'$(=only({<adjustment_category_pss={"$(=Replace('All entries (DEIMGs, college, school, residency ) cosmic', ',', ''))"}>} column))'
But I am not wanting to get rid of the commas in my column - as that is part of the data.
I am using variables - I have a variable Input which has a value 'All entries (DEIMGs, college, school, residency ) cosmic' and based on this value I was wanting to filter.
.....
Note how after the comma - my text is getting cropped.
This is lost when you try to pass the string as a parameter, this is seen for Qlik as multiple parameters.
I expected something like this. There is no way to change the Qlik behaviour of treating them as parameter-delimiter and no way to mask them. Therefore my above suggestion of skipping this part and not struggling with any kind of technically bypassing the logic. The aim of variables is to simplify the matter and not resulting in the opposite.
Instead of using the commas like showed you may replace them with a ; or + within the possible variable-values as well as within the data (you may also double this field to show it in the origin version and using an adjusted one for the set analysis condition).
Another approach could be to replace the variable with an appropriate field from an independent island-table and then the set analysis might look like:
{< MyField = p(MySelectionField)>}
Worst case, if you have an input variable called myInputVariable. You create another one myInputVariableCorrected with =Replace(myInputVariable,',','?')
Then you can use $(vTranslateAdjustmentCategory("$(myInputVariableCorrected)")).
With the double quotes, this should work with an expression like this $(=only({<adjustment_category_pss={$1}>} column))