Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Only selected year to show up

I need (through set analysis) to show selected years or months on this chart depending what the user selects:

for example, when they select a year of 2014, I would only like the red line to show up. if they pick two months (i.e. Jan-Feb), along with 2014, I want to see the red line only for those two months.

The equations I have right now for the three expressions are as follows in descending order of year:

  • sum({$<Year= {$(=Year(Today()))}>} MembershipFlag)
  • sum({$<Year= {$(=Year(Today())-1)}>} MembershipFlag)
  • sum({$<Year= {$(=Year(Today())-2)}>} MembershipFlag)

Any help on this is greatly appreciated.

Thanks,

Joe

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Joe,

Looks like you want chart to behave according to selections.  Set analysis is needed when you want to override selections.  So, in you case set analysis is not needed.  Instead, add Year as a dimension to your chart, and expression will be

sum(MembershipFlag)

Regards,

Michael

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Joe,

Looks like you want chart to behave according to selections.  Set analysis is needed when you want to override selections.  So, in you case set analysis is not needed.  Instead, add Year as a dimension to your chart, and expression will be

sum(MembershipFlag)

Regards,

Michael

Not applicable
Author

Amazing, thank you. However, I need to push out reports of this chart from a month ago. For example, I want to show the last 2 years on that report with only January selected slated out the 1st of February. Does that make sense?

Thanks,

Joe

Not applicable
Author

Do you just mean January for each of the two years? Or 1 full year and just january from the other?

If it's the first you should just be able to select the years and month you want.

If it's the latter, you might need to use a year&month concatenated field and select within that, to be able to select all of 2013 for example and then just January 2014

hope that helps

Joe

Not applicable
Author

Yup! Makes sense to me. Thank you.

Not applicable
Author

no problem glad to help, also great name

Not applicable
Author

Hah! Same to you... though your last name needs some work