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

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
hallquist_nate
Partner - Creator III
Partner - Creator III

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
hallquist_nate
Partner - Creator III
Partner - Creator III

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



juraj_misina
Luminary Alumni
Luminary Alumni

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

Anonymous
Not applicable
Author

Thanks for the help it worked.

Anonymous
Not applicable
Author

Thank you for the suggestion