Qlik Community

Qlik Sense App Development

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

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
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
Highlighted
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)?

Highlighted
Partner
Partner

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

Sandeep Sarawgi