Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

EXPRESSION

Hi,

I have created the following expression in a text object and it is working well

=num((Sum({<[NOTE]={100},DEPT={'BRAN'},MONM={'MOTOR'},BRANCH= >}[AMOUNT]))

Now I have also created a variable as follows

EPremium  =  (sum( {<NOTE = {'100'}>}[AMOUNT]*-1 ))

I want to apply above variable into my expression. Please  help me Thanks in Advance

1 Solution

Accepted Solutions
brijesh1991
Partner - Specialist
Partner - Specialist

Hi,

If you want to give explicit selection by variable, then you can follow exactly like this:

=num((Sum({<EPremium ={'$(createdVariableName)'} , [NOTE]={100},DEPT={'BRAN'},MONM={'MOTOR'},BRANCH= >}[AMOUNT]))

View solution in original post

4 Replies
MK_QSL
MVP
MVP

select a text box and insert below

=EPremium

rustyfishbones
Master II
Master II

Do you mean you want to add DEPT={'BRAN'},MONM={'MOTOR'},BRANCH= into the variable?

I would create a MyVariable variable for DEPT={'BRAN'},MONM={'MOTOR'},BRANCH=

and then add that into my Expression,something like

(sum( {<NOTE = {'100'}, $(MyVariable)>}[AMOUNT]*-1 ))

upaliwije
Creator II
Creator II
Author

My real requirement is to insert variable into this

=num((Sum({<[NOTE]={100},DEPT={'BRAN'},MONM={'MOTOR'},BRANCH= >))

brijesh1991
Partner - Specialist
Partner - Specialist

Hi,

If you want to give explicit selection by variable, then you can follow exactly like this:

=num((Sum({<EPremium ={'$(createdVariableName)'} , [NOTE]={100},DEPT={'BRAN'},MONM={'MOTOR'},BRANCH= >}[AMOUNT]))