Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

FirstSortedValue( Aggr(Concat(distinct Name, ',') , Date), -Aggr(Date,Date)) this expression how to write in script level

FirstSortedValue( Aggr(Concat(distinct Name, ',') , Date), -Aggr(Date,Date))  this expression how to write in script level

2 Replies
swuehl
MVP
MVP

Maybe something like

TMP:

LOAD Date,

          Concat(DISTINCT Name,',') as ConcatString

FROM INPUT

GROUP BY Date;

RESULT:

LOAD FirstSortedValue(ConcatString, -Date) as Result

RESIDENT TMP;

DROP TABLE TMP;

Are you using the chart expression in a certain chart context (i.e. dimension)?

sandeep_sarawgi
Partner - Contributor III
Partner - Contributor III

Posting my reply (similar to my reply to your previous post):

Temp:
Load
distinct max(Date) as Date
Resident Facts
Group by Name;

Left Join (Facts)
Load
     Date,
    1 as MaxNameDate
Resident Temp;

Drop Table Temp;

Then use something like =Sum({<MaxNameDate={1}>}Value), as an example, for doing aggregation for records where date is max for name in chart with dimension = Name

Sandeep Sarawgi