Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
l_denivelle
Creator
Creator

Use Set Analysis into variable

Hi

I'm trying to put a variable into a Set Analysis. The problem is that my variable is the result of another Set Analysis.

Here an example :

I have my first Set Analysis :

LET MyFirstSetAnalysis = ''Avg( { < [Type de date]= { ' & chr(39)& 'Engagement' &chr(39)& '}, [Année]={'&chr(39)&'2015' &chr(39) & '} > } [Délai de réponse])';

Now I want a new Set Analysis which will contain the result of my first Set Analysis :

LET MySecondSetAnalysis= 'Count( { < [Délai] = { >= $(' & MyFirstSetAnalysis & ' ) } > } DISTINCT [Code module])';

If I display my variable I get this :

Count( { [Délai]= {>= } > } DISTINCT [Code Module];

Questions :

- Can we us Set Analysis into another Set Analysis ?

- If yes, how ?

Thank you !

12 Replies
maximiliano_vel
Partner - Creator III
Partner - Creator III

Try to create the variables in Settings->Variable Overview

l_denivelle
Creator
Creator
Author

It works !

but you forgot the double quote before and after the variable :

LET MySecondSetAnalysis= 'Count( {<[Délai] = {>=" $' & '(=' & MyFirstSetAnalysis & ')"}>} DISTINCT [Code module])';


thank you very much

l_denivelle
Creator
Creator
Author

Thank you all for your quick answers.

Jonathan's solution works for me.