Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Highest Year Selected Data

Hi Guys,

So I have some data (customer incidents) being graphed against Months in a line graph. I have two lines right now. One for the sum of customer incidences for each month and one for a cumulative YTD of customer incidences. I also have a filter on the side with years dating back to 2013. When I filter the data for two or more years, lets say 2017/2018, I want the first line to always show the data for only the highest year. Right now it is combining the 2017 and 2018 data. Any suggestions would be appreciated.

Right now the expression is just SUM([Customer Incidences]) for the current month by month and RANGESUM(ABOVE(TOTAL SUM([Customer Incidents]),0, ROWNO(TOTAL))) for the cumulative.

Thanks!

1 Solution

Accepted Solutions
Partner
Partner

To limit your expression to only consider the latest years' data, try using the below set expression.


Year={$(=Max(Year))}


Your Formula should look something like this.....


SUM({$< Year={$(=Max(Year))} >}[Customer Incidences])


Nate



View solution in original post

4 Replies
Partner
Partner

To limit your expression to only consider the latest years' data, try using the below set expression.


Year={$(=Max(Year))}


Your Formula should look something like this.....


SUM({$< Year={$(=Max(Year))} >}[Customer Incidences])


Nate



View solution in original post

Luminary
Luminary

Hi Ariana,

optionally to Nate's very good suggestion you can also create a Year-Month field in script and use that as a dimension in your chart.

Juraj

Contributor III
Contributor III

Thanks for the help it worked.

Contributor III
Contributor III

Thank you for the suggestion