Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression with the previous year - Expressão com ano anterior

Good afternoon,

I have a doubt in an expression that I created to make a graph. this graph a line and I wanted a two-line displays the current year to select from a list and one I wanted last year, how? to pull the current year just do Sum (value).

Boa tarde,

Tenho uma dúvida em uma expressão que criei para fazer um gráfico. esse gráfico tenho uma linha e queria duas linhas uma mostra o ano atual que seleciono em uma lista e o outro eu queria o ano anterior, como faço ? para puxar o ano atual apenas faço Sum(valor).

1 Solution

Accepted Solutions
Not applicable
Author

Hi William.

I use a "set analysis" to create the previous year expression.

Here an example:

SUM({$< Year={'$(=Max(Year))'}>} Value)  Expression of current selected year

SUM({$< Year={'$(=Max(Year)-1)'}>} Value) Expression of previous Year

Let me know if this example help you!

Regards

View solution in original post

1 Reply
Not applicable
Author

Hi William.

I use a "set analysis" to create the previous year expression.

Here an example:

SUM({$< Year={'$(=Max(Year))'}>} Value)  Expression of current selected year

SUM({$< Year={'$(=Max(Year)-1)'}>} Value) Expression of previous Year

Let me know if this example help you!

Regards