Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

ashok25006323
New Contributor III

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
MVP
MVP

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

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)?

ssarawgi
New Contributor III

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

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

Community Browser