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: 
Anonymous
Not applicable

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
Anonymous
Not applicable
Author

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)

Anonymous
Not applicable
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)