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: 
saurav12345678
Partner - Contributor II
Partner - Contributor II

Max date availability

Hi All,

I have to find the max date(MMYYYY) in which filter value PCAAT00 and PJABF00 must available for bate c.

Here i attaching the data set for reference.

max mmyyyy is 022024.

max({<bate={'c'},filter={'PCAAT00','PJABF00'}>}MMYYYY)  ---032024 which is wrong

 

Thanks.

Qlik Sense Desktop maxDate.png

Labels (6)
1 Solution

Accepted Solutions
Clement15
Creator III
Creator III

Hello, depending on how your model is trained this should work.

min(aggr({<bate={'c'},filter={"PCAAT00","PJABF00"}>}max(MMYYYY),filter))

View solution in original post

6 Replies
Clement15
Creator III
Creator III

Hello, depending on how your model is trained this should work.

min(aggr({<bate={'c'},filter={"PCAAT00","PJABF00"}>}max(MMYYYY),filter))

saurav12345678
Partner - Contributor II
Partner - Contributor II
Author

Sure, Let me try.

pravinboniface
Creator II
Creator II

@saurav12345678 In your data, the row with value 102.38, MMYYYY indeed has a maximum 0f 032024.

If max is having an issue with the date format, I would use:

max({<bate={'c'},filter={'PCAAT00','PJABF00'}>}date(date#(MMYYYY,'MMYYYY'),'MMYYYY'))

But it looks like you are already getting the right value.

saurav12345678
Partner - Contributor II
Partner - Contributor II
Author

But i have to get max date in which both code(PCAAT00,PJABF00) must present. Date is 022024.

pravinboniface
Creator II
Creator II

@Clement15 Interesting solution- how does this work?

Clement15
Creator III
Creator III

Thanks to the aggr you take the maximum date for each filter. Since we want the last date where all the filters took place, we take the smallest of the maximum dates because all the filters will have reached or exceeded it.