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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

first sorted value and aggr

hi all,

i cant seem to work out why the below wont work

=FirstSortedValue(aggr(sum({$< Area -= {''}>}[Total Emissions]),Area),Area)

basically the aggr creates a virtual table of total emissions grouped by area (this works ive tested it separately). i then want to sort that table such that i return the area with the highest total NOx.

any help is much apprecoated/

thanks

Labels (1)
10 Replies
anushree1
Specialist II
Specialist II

Hi Sunny,

I happened to check this thread and seemed to have seen something different here the Expression:

FirstSortedValue({$< Area -= {''}>} Area,-Aggr(Sum({$< Area -= {''}>}[Total Emissions]),Area))

Very first Parameter into FirstSortedValue Function which is usually a Dimension is defined by a Set Analysis Expression but not encapsulated with any aggr function , so could you please spare some time and explain the situation here.

I have changed the font of the Parameter in the expression to emphasize what exactly is my question