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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
agomes1971
Specialist II
Specialist II

Between Years Comparison

Hi,

is it possible to create an expression from a set analysis that compares one year with the previous?

Please see attached.

Thanks

1 Solution

Accepted Solutions
maxgro
MVP
MVP

if you mean this the expression is

Sum({$<Year={">$(=max(Year)-5)<=$(=max(Year))"}>}Vendas)/1000

-

above(Sum({$<Year={">$(=max(Year)-5)<=$(=max(Year))"}>}Vendas)/1000)

1.png

View solution in original post

4 Replies
MK_QSL
MVP
MVP

Current Year

SUM(Sales)

Previous Year

SUM({<Year = {'$(=Max(Year)-1)'}>}Sales)

ecolomer
Master II
Master II

Try this:

sum({$ < Año={$(=max(Año)-1)} > } Ventas)


where Año (=Year) is the maximun year selected

maxgro
MVP
MVP

if you mean this the expression is

Sum({$<Year={">$(=max(Year)-5)<=$(=max(Year))"}>}Vendas)/1000

-

above(Sum({$<Year={">$(=max(Year)-5)<=$(=max(Year))"}>}Vendas)/1000)

1.png

agomes1971
Specialist II
Specialist II
Author

Almost that.

The expresssion I needed was:

(Sum({$<Year={">$(=max(Year)-5)<=$(=max(Year))"}>}Vendas)/1000

-

above(Sum({$<Year={">$(=max(Year)-5)<=$(=max(Year))"}>}Vendas)/1000))/

above(Sum({$<Year={">$(=max(Year)-5)<=$(=max(Year))"}>}Vendas)/1000)

but without your contribution it could not be possible.

Thank you so much

André Gomes