Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting familiar with SET analysis

Hi Folks,

I am very much new to QlikView.

I am trying to achieve something like below:

I want to get maximum LastAccess(date) for the year 2014

=max({<Year(LastAccess)={'2014'}>}LastAccess)

For some reason this formula does not give any data back.

However when apply max(if(year(LastAccess)=2014,LastAccess)), it works.

Is there something I am missing?

Regards,

Tejas

4 Replies
sunny_talwar

You cannot use functions on the left hand side of your set analysis modifier:

=Max({<Year(LastAccess)={'2014'}>}LastAccess)


The best way would be to create a field in the script using LastAccess for Year and use that


Year(LastAccess) as Year


=Max({<Year = {'2014'}>} LastAccess)


UPDATE:

or if you don't want to change the script, then use a longer alternative:

=Max({<LastAccess = {"$(='>=' Date(MakeDate(2014, 01, 01), 'YourLastAccessFieldFormatHere') & '<=' & Date(MakeDate(2014, 12, 31), 'YourLastAccessFieldFormatHere'))"}>} LastAccess)

Anonymous
Not applicable
Author

Not applicable
Author

Thank you Sunny for you response.

Is it some kind of limitation? Do we have a document for such limitations?

Regards,

Tejas

sunny_talwar

I don't think I have seen a document for limitations, but you might find the attached useful as it guides you what are some things you can do with set analysis. I have not come across anything more comprehensive then what's attached on this topic.