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

display particular year with current selection year

If I want to display  2019 year sales with current selection year sales in a barchart what's the expression. 

Dimension is year.

Year data is like this 2016, 2017, 2018, 2019. So if I select 2018 , I want to display 2018 data as well as 2019 data in common and not display other years data.

1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

Using Set Analysis, you can do this.

Lets assume your measure is Sum(Sales), then to include 2019 and what ever year is selected:

Sum({$<Year+={2019}>}Sales)

View solution in original post

5 Replies
Lisa_P
Employee
Employee

Using Set Analysis, you can do this.

Lets assume your measure is Sum(Sales), then to include 2019 and what ever year is selected:

Sum({$<Year+={2019}>}Sales)

Karthiek22
Contributor
Contributor
Author

  • Thank you, 

But if I select any year , I want to display that year (2016,2017,2018)and one common particular year(2019).

If I select 2016 , I want to display only 2016 and 2019 data.

If I select 2017 , I want to display only 2017 and 2019 data.

Lisa_P
Employee
Employee

Have you tried this ?

Karthiek22
Contributor
Contributor
Author

Ya...it shows only selected year data.

Lisa_P
Employee
Employee

This works for me