Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

Tags (1)
4 Replies

Re: Getting familiar with SET analysis

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)

balrajahlawat
Esteemed Contributor

Re: Getting familiar with SET analysis

Not applicable

Re: Getting familiar with SET analysis

Thank you Sunny for you response.

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

Regards,

Tejas

Re: Getting familiar with SET analysis

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.

Community Browser