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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help needed with a set analisys !!

Hi:

I'm trying to make a simple bar chart with X=time dimension (years) and Expression = Difference between "Sales Current Year - Sales Previous Year".

By example:

year 2000 --------> Sales $100

year 2001 --------> Sales $250

year 2002 --------> Sales $600

So I want get for:

year 2001 -------> $150 ($250 -$100)

year 2002 -------> $350 ($600-$250)

and so on...

I´ve tried with this set expression:

sum([Sale]) - sum({$<Year={$(#Year -1 )} > }[Sale])


but $(#Year -1 ) becomes in a empty string or in some cases (lightly variants) in 0 (zero).

Could any help me !

Very thankful



1 Solution

Accepted Solutions
Not applicable
Author

Hi,

try this:

Sum(Sale)-above(Sum(Sale))

Alex

View solution in original post

2 Replies
Not applicable
Author

Hi,

try this:

Sum(Sale)-above(Sum(Sale))

Alex

Not applicable
Author

Perfect !!!

Clearly this is the easyest way!

Thankful!

Pablo