Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
kevbrown
Creator II
Creator II

Last Year Label

Hi,

I have a small dataset that brings in some financials, a year field and a text field called Season.  I'm looking to have 2 sets of data, one for the max financial year selected and one for last.  The figures aren't an issue, they're working fine but it's the titles I'm struggling with.  For the max year =If(Max(Year)=Year,Season) works, but what do I need to do for the previous year?

Thanks

1 Solution

Accepted Solutions
sunny_talwar

Where exactly are you showing this information? May be try this:

Only({<Year = {"$(=Max(Year) - 1)"}>}Season)

or

Concat({<Year = {"$(=Max(Year) - 1)"}>}Season, ', ')

View solution in original post

5 Replies
sunny_talwar

May be this?

=If((Max(Year) - 1) = Year, Season)

kevbrown
Creator II
Creator II
Author

No, comes up blank

sunny_talwar

Where exactly are you showing this information? May be try this:

Only({<Year = {"$(=Max(Year) - 1)"}>}Season)

or

Concat({<Year = {"$(=Max(Year) - 1)"}>}Season, ', ')

View solution in original post

miguelbraga
Specialist III
Specialist III

Hey there,

Can you share a qvw sample so that we can see where you're using this expression.

Might be helpful see this post:

Current Month vs Last Month

Re: Current Years Current Month Vs Last Year Same Month Sales

Regards,

MB

kevbrown
Creator II
Creator II
Author

Worked a treat, thanks