Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have set analysis expression stored in my database in string format and I would like to know if there's a way to evaluate this expression :
LOAD
ID_EXPRESSION
EXPRESSION
FROM [lib://$(QvdConnection)/Expression.QVD]
Any idea how to proceed ?
Thanks
Peter
To apply expressions on the front end, you don't need to put them into variables, just use the Dollar sign expansion with an = sign to evaluate the expression
eg. $(=Only({<ID_EXPRESSION={n}>}EXPRESSION))
Perhaps its meant to store the expression outside of a single app and re-use it in multiple apps?
If that is the case I think there should be a way.
Does it work if you test a valid set analysis expression without single quotes? I would test that first. If it does work without single quotes but fails with single quotes, you might need to find a way to properly escape the single quotes by adding a preceding single quote to each single quote
replace($(vExpression_to_evaluate), chr(39), chr(39) & Chr(39))
https://community.qlik.com/t5/Design/Escape-sequences/ba-p/1469770
I'm not sure about what you are trying to achieve here, is it just a matter of storing expressions in a table in the load script and utilizing them in the charts ?
To apply expressions on the front end, you don't need to put them into variables, just use the Dollar sign expansion with an = sign to evaluate the expression
eg. $(=Only({<ID_EXPRESSION={n}>}EXPRESSION))
Perhaps its meant to store the expression outside of a single app and re-use it in multiple apps?
If that is the case I think there should be a way.
Does it work if you test a valid set analysis expression without single quotes? I would test that first. If it does work without single quotes but fails with single quotes, you might need to find a way to properly escape the single quotes by adding a preceding single quote to each single quote
replace($(vExpression_to_evaluate), chr(39), chr(39) & Chr(39))
https://community.qlik.com/t5/Design/Escape-sequences/ba-p/1469770
Thank you all for your answers