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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

variable

Hi Friends

I have created a variable and working fine when applied to a expression as follows

=($(vProfit))

but when I modify the expression like below it does not work.Will you please highlight   the error in expression please

=sum({$<YEAR = {"$(=Only([YEAR]))"},T_YEAR = {"$(=Only([YEAR]))"}>} $(vProfit))

12 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

Agree with Lucian,

So if you can best describe what do you want to achieve with your Set Analysis, including which fields do you want to aggregate, and other filters you want to add in the expression.

upaliwije
Creator II
Creator II
Author

THANKS

cNA YOU PLS HELP ME TO REWRITE THE EXPRESSION

luciancotea
Specialist
Specialist

=sum({$<YEAR = {"$(=Only([YEAR]))"},T_YEAR = {"$(=Only([YEAR]))"}>}  aggr( $(vProfit), YEAR , T_YEAR )  )

and I would replace all the expressions similar to

sum( {<NOTE = {'120','121','123'}>}[AMOUNT] )

with similar

sum( if(match(NOTE, '120','121','123'), [AMOUNT]) )