Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
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

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