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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

User defined function in Set Analysis

Dear all,

I try to combine the functionality of a user defined function in a Set Analysis;

- variable 'vFunction' defined as 'maxstring ({< SelectField = {$1} >} OutputField)' (-> no '=')

- Set analysis defined as 'avg( {< FilterField = ('$(vFunction(x) >} CalcField)'

However this does not work. I suspect the problem is that the variable is not yet calculated, and therefore the whole function is passed on as a string instead of the outcome of the user defined function. I did some trial and error with double quotes or an '='; however without any success.

Koen

3 Replies
sunny_talwar

You seem to be missing a parenthesis and a single quote and curly brackets. Is this a typo?

Avg( {< FilterField = {'$(vFunction(x))'}>} CalcField)

Not applicable
Author

Thanks. This is a typo while making the function anonymous.

Verstuurd vanaf mijn iPhone

Op 8 feb. 2016 om 14:29 heeft Sunny T <qcwebmaster@qlikview.com> het volgende geschreven:

User defined function in Set Analysis

reply from Sunny T in QlikView Layout & Visualizations - View the full discussion

You seem to be missing a parenthesis and a single quote. Is this a typo?

Avg( {< FilterField = ('$(vFunction(x))' >} CalcField)

Reply to this message by replying to this email, or go to the message on Qlik Community

Start a new discussion in QlikView Layout & Visualizations by email or at Qlik Community

Following User defined function in Set Analysis in these streams: Inbox

© 1993-2016 QlikTech International AB | Copyright & Trademarks | Privacy | Terms of Use | Software EULA

sasikanth
Master
Master

HI,

You can write that condition in set itself

Avg({<FilterField={ '$(=maxstring ({< SelectField = {$1} >} OutputField))'}>}CalcField)

Make sure the output of maxstring values are in sync with FilterField