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: 
Not applicable

Dollar Sign Expansion of Only with several values.

Hi Community,

Is there away to do set analysis dollar sign expansion of an "Only(" for several values.  Basically, I want to do the following with several years like 2012, 2013,

sum({$<Year = {$(=Only(Year))} >} LineSalesAmount)

or

sum({$<  Year = {$(=$(vCurrentYear))}> } LineSalesAmount)

Again, I want to use one of the above but have it for seveal years and not just one.

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

you can have a number of values, each one represented by its own $-sign expansion, separated by comma:

For example:

sum({$<Year = {$(=Only(Year)), $(=Only(Year)-1), $(=Only(Year)+1)  } >} LineSalesAmount)

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

you can have a number of values, each one represented by its own $-sign expansion, separated by comma:

For example:

sum({$<Year = {$(=Only(Year)), $(=Only(Year)-1), $(=Only(Year)+1)  } >} LineSalesAmount)

SunilChauhan
Champion II
Champion II

use below

sum({$<Year = {$(=max(Year))} >} LineSalesAmount)

hope this helps

Sunil Chauhan
Not applicable
Author

Wonderful!  Thank you, thats very helpful!