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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

FirstSortedValue inside Set Analysis for an Expression

I only want to avg the number of cat_favor_points for my favorite cat, which is determined by who has the most cat_favor_points.  I cannot seem to get this expression to resolve.


avg({<cat={"='$(=FirstSortedValue(cat,cat_favor_points))'"}>} cat_favor_points)


The FirstSortedValue does work in a text box on its own: ='$(=FirstSortedValue(cat,cat_favor_points))'


Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

=Avg({<cat={"$(=FirstSortedValue(cat,cat_favor_points))"}>} cat_favor_points)

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

Try this:

=Avg({<cat={"$(=FirstSortedValue(cat,cat_favor_points))"}>} cat_favor_points)

Not applicable
Author

awesome that worked thank you!  always get a little confused on the semantics

sunny_talwar
MVP
MVP

They indeed are very confusing and drives me crazy sometimes.

Best,

Sunny