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: 
ioannagr
Creator III
Creator III

first sorted value issue

Hello all,

i've got an issue where first sorted value can be multiple values

=FirstSortedValue([name], -Aggr(sum( {1} [countid]), [year], [name] ))

and in pivot table by year for name i get "-" because there are multiple names with the same sum... 

How can I fix this?

3 Replies
Anil_Babu_Samineni
MVP
MVP

How do you need? Perhapd this way

=FirstSortedValue(Concat(distinct [name], ','), -Aggr(sum( {1} [countid]), [year], [name] ))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ioannagr
Creator III
Creator III
Author

Hello @Anil_Babu_Samineni  yes probably something like that, but this expression doesn't work. Gives error like "nested aggregation isn't allowed".

 

Thanks though 🙂

Anil_Babu_Samineni
MVP
MVP

can you share sample application where we can demon the same?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful