Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
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% !