Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
daisy1438
Contributor III
Contributor III

how to write the set expression for highest sale year?

Hi

t1:

LOAD * Inline [

year,sales

2010,100

2010,200

2011,500

2010,600

2012,300

];

my requirement is in KPI i want show   highest sale year .the above liline table 2010 is the  highest sales year.

i am writing below expression

=max(Aggr(Sum(sales),year))

it showinh highest sales value 900.but i need show year not sales value.

how to write the set expression.

Thanks

1 Reply
Quy_Nguyen
Specialist
Specialist

Try:

FirstSortedValue(year, -Aggr(Sum(sales),year))