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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use Variable in Expression

I want to use a variable to replace "2013 BUDGETV2" in the below expression, what is the correct formula for this?

Sum({<BUDGETID={[2013 BUDGETV2]}>} BUDGETAMT)*-1

THANKS in advance

Labels (1)
1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Set a variable as

vBudget = 2013 BUDGETV2

Expression

Sum({<BUDGETID={'$(vBudget)'}>} BUDGETAMT)*-1

View solution in original post

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Set a variable as

vBudget = 2013 BUDGETV2

Expression

Sum({<BUDGETID={'$(vBudget)'}>} BUDGETAMT)*-1

kaushiknsolanki
MVP
MVP

Hello,

     Consider your variable name is vVariable then your expression will become like below.

     Sum({<BUDGETID = {"$(vVariable)"}>}BUDGETAMT)*-1

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!