Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
olivierbuchy
Creator
Creator

Set Analysis, Dates and Variables

I want to use Set Analysis on a date but I seem to miss the correct formatting.


I load something like this :

LOAD

     date(@1) as DateExport,

     Ratio

FROM

(bla,bla...)


In my load script, I calculate the max value

SET vMaxDate = max({1} DateExport );


Later on in my charts I want to use this


=max({$ < DateExport={'$(vMaxDateVisites)'} >} Ratio)


which fails miserably but the following line works like a charm


=max({$ < DateExport={'19/04/2018'} >} Ratio)


What am doing wrong with my vMaxDate variable or Set Analysis syntax?

1 Solution

Accepted Solutions
Digvijay_Singh

Hi,

Set Analysis doesn't work in script. You can use Max function directly in the measure expression something like this -

=max({$ < DateExport={"=$(=Max(DateExport))"} >} Ratio)

View solution in original post

4 Replies
wassim1988
Contributor III
Contributor III

Hi Olivier,

i think that you are not using the same variable that u did declare no?

Digvijay_Singh

Hi,

Set Analysis doesn't work in script. You can use Max function directly in the measure expression something like this -

=max({$ < DateExport={"=$(=Max(DateExport))"} >} Ratio)

olivierbuchy
Creator
Creator
Author

Thanks this works.

sunny_talwar

I wonder if the set analysis is even working digvijay‌, you seem to have an extra parenthesis before $(

=max({$<DateExport={"=$(=Max(DateExport))"} >} Ratio)