Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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))'


1 Solution

Accepted Solutions
sunny_talwar

Try this:

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

View solution in original post

3 Replies
sunny_talwar

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

They indeed are very confusing and drives me crazy sometimes.

Best,

Sunny