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

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

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