Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro substitution in a field name

Maybe this question has been answered docens of times but I haven't been able to find it.


Lets supose that I have a field BUDGET and a field TARGET and a variable budortar which value can be switched between BUDGET to TARGET


Then I have several charts with expressions which I would like to switch between BUDGET or TARGET, according to the variable value. Is there any way to put something like &budortar in the expressions so that they refer to BUDGET or TARGET depending on the variable value?

1 Solution

Accepted Solutions
pat_agen
Specialist
Specialist

hi,

just try sum($(budortar)) as your expression. This will then be evaluated as either sum(BUDGET) or sum(TARGET).

give it a try

View solution in original post

1 Reply
pat_agen
Specialist
Specialist

hi,

just try sum($(budortar)) as your expression. This will then be evaluated as either sum(BUDGET) or sum(TARGET).

give it a try