Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
swathidumpala
Contributor
Contributor

Max function not working in the Where condition

Hi Team ,

When I ran  the script with  ( where MKY='201907' ) condition it loaded well.

As part of automating the script when  I replaced the same 

with  num#(MKY) = max(num#(MKY)) I got an error while loading.

I am unsure why it is happening.

Requesting help!

Thanks,

Swati

10 Replies
Anil_Babu_Samineni

Perhaps this?

T1:
LOAD * From Inline;

MaxMKY:
LOAD Max(MKY) as MKY_Max Resident T1;

LET vMax = Peek('MKY_Max', -1, 'MaxMKY');

Final:
NoConcatenate
LOAD Id, MKY Resident T1 Where MKY = $(vMax);

DROP Table T1;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful