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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
saurav5246
Partner - Contributor III
Partner - Contributor III

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
Partner - Specialist
Partner - Specialist

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
Partner - Specialist
Partner - Specialist

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

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

saurav5246
Partner - Contributor III
Partner - Contributor III
Author

Sure, Let me try.

pravinboniface
Creator III
Creator III

@saurav5246 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.

saurav5246
Partner - Contributor III
Partner - Contributor III
Author

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

pravinboniface
Creator III
Creator III

@Clement15 Interesting solution- how does this work?

Clement15
Partner - Specialist
Partner - Specialist

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.