Skip to main content
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Generate a dynamic variable for evaluation / substitution

I want to dynamically generate a variable that can be evaluated.

These are the 2 methods that I have attempted but they are not working.

The dashKPI1% and dashKPI2% are names of selections the user can pick on the screen.


$('v' & only(dashKPI1%) & 'Revenue') - $('v' & only(dashKPI2%) & 'Revenue')

$(=('v' & only(dashKPI1%) & 'Revenue')) - $(=('v' & only(dashKPI2%) & 'Revenue'))


It should end up giving me something like $(vCurrentRevenue)-$(vPriorRevenue) and then display the number.

Any ideas?

Labels (4)
1 Reply

This should work as you have shown,

$(=('v' & only(dashKPI1%) & 'Revenue')) - $(=('v' & only(dashKPI2%) & 'Revenue'))

Although if user select more than one name selection at a time then it wont work if dashKPI1% & dashKPI2%  are fields.

Best way is to use variable for dashKPI1% & dashKPI2% to ensure one selection is made at a time.

Use dynamic variable and put value as  Concat(dashKPI1%,'|') to get it in drop down list.


Please show your entire table containing dashKPI1% & dashKPI2% !