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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

First Sorted Value

Hi,

I'm trying to use the first sorted value function to return the overall winner of a test we're running. The table below shows the data I'm working with:

Screen Shot 2014-06-27 at 17.28.22.png

The winner of this test has the highest Prejoin>Join ratio, which in this case is Theme 3200. I'd like to return the value 3200 in every row in the column 'Overall Winner'. I'm using the following expression without success:

=FirstSortedValue(Themes, -Aggr(sum(vCTR),Themes))


vCTR is simply a variable storing the quotient of Join/Prejoin. If anyone has an idea on how to solve this that would be great. Sample data attached.


Thanks.


Matt

1 Solution

Accepted Solutions
Nicole-Smith

This should do the trick:

only({<Themes={'=rank(sum(CT)/sum(C),0,1)=1'}>}total Themes)

View solution in original post

2 Replies
Nicole-Smith

This should do the trick:

only({<Themes={'=rank(sum(CT)/sum(C),0,1)=1'}>}total Themes)

Not applicable
Author

Works like a charm, thanks so much for the help!

Matt