Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Showing latest year if current year is not available

I have a scorecard where users are forced to select a Year to get the data to appear.  When a user selects '2015-16' one chart in the scorecard says ' No data to display' because that data will not be published until much later in the year.  For that chart I would like to show the previous years data and clearly label it as the previous year in the title of the chart.  How do I get the chart to show data for the previous year if the selected year is unavailable?

Thanks

Greg

2 Replies
sunny_talwar

May be using set analysis... not sure what else to say without having more details

stephenedberkg
Creator III
Creator III

Try like this

=If(sum(score) = 0 ,

sum({<Year={$(=Max(Year)-1)},MonthID={$(=Max(MonthID))},>}Score),

  sum({<Year={$(=Max(Year))},MonthID={$(=Max(MonthID))}>}Score) )