Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinDallas
Specialist III
Specialist III

Data disappears on Year selection

Hello Everyone,

I've got a strange issue whereby my data is disappearing from my chart when I select a year.  With nothing selected, the Max(Year) =2017 and I get a chart like this.

Chart_1.png

If you look to the right, you can see that I've got a spot for the result of Max(Year) - 1 and Max(Year).  However,  as soon as I select the Year [2017] from a filter list, all of the data that should show based on Max(Year) - 1 disappears.

My bar chart Expressions look like this

Sum({<Year = {$(=max(Year))}>} [Stop Leg Mileage])

for the current year, and

Sum({<Year = {$(=max(Year)-1)}>}  [Stop Leg Mileage])

for the previous year.

Generally, when data falls away, it means that you haven't linked in correctly, but I've verified that the data does exist.

Any help is greatly appreciated.

1 Reply
JustinDallas
Specialist III
Specialist III
Author

The data does appear when I add a '1' to the front of my Set Analysis.  I went from

Sum({<Year = {$(=max(Year)-1)}>} [Stop Leg Mileage])

to Sum({1<Year = {$(=max(Year)-1)}>} [Stop Leg Mileage])

and it works fine.  I guess what was happening was that when the Year was selected, the data pertaining to 'Year-1' was excluded.  The 1 tells the system to ignore the Year selections made by the user.