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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue in Aggr and Set

Hi All.

I want to find the Destination on Max date for every Name .

AGGR and set behaving abruptly.

Regards

erika

14 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try MaxString(aggr(if(NUM=max(total <Name> NUM),Dest),NUM,Dest,Name))


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thanks Gysbert!!!!!!

rajni_batra
Specialist
Specialist

HI Gysbert ,

We tried this expresion but this is taking lot of Time and RAM on actual data to process..

Is there any other to optimize it or other suggestion!!!

Any help would be appreciated..

Regards,

rajni batra

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Do the calculations in the script:

T1:

LOAD Date,

num(Date) as NUM,

Month(Date) as Month,

     Dest,

     Name

FROM ...etc

join load Name, max(NUM) as NUM, 1 as Flag

Resident T1

group by Name

Then use the new Flag field in the expression:

concat({<Flag={1}>} Dest, ', ')


talk is cheap, supply exceeds demand
rajni_batra
Specialist
Specialist

Hi Gysbert,

Thanks for your reply, Can't do it in scripting as max value is based on User selection,

I have tried something(basically trying to remove IF) which is working fine in some conditions..

like it is not working for current selection i have made but if i will clear that it gives fine output,

Please check if you could help in that...

Regards,

Rajni