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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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
Champion III
Champion III

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