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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

Show single value of dimension where date =max(date)

Hi All.

I have the following expression which is giving data for the max Date

Max(Date([Expiry Date2],'DD/MM/YYYY')).

davyqliks_0-1663154729207.png

 

when i add a new field to the table (cert_attach) i get the max date for all of the certs (which all have individual values)

 

davyqliks_1-1663154839692.png

How can i write an expression please to only show the relevant cert_attach (scope certificate) for only the max date.

 

when i try the following as a measure i am getting null return. 

If([Expiry Date2] = Max(Date([Expiry Date2],'DD/MM/YYYY')),cert_attach)

 

davyqliks_2-1663155034858.png

 

thank you

 

 

Labels (1)
2 Replies
BrunPierre
Partner - Master II
Partner - Master II

Try these

=Max(Aggr(Maxstring(cert_attach),[Expiry Date2]))

or

=Maxstring({<[Expiry Date2]={"$(=MAX([Expiry Date2]))"}>}cert_attach)

davyqliks
Specialist
Specialist
Author

Thank you for the suggestion,

i have found there is another value in the data forcing the cert over multiple lines. Factory Profile.

davyqliks_0-1663160337850.png

 

so in theory what i have is the unique cert for the max date.

 

I need the measure to be a dimension. so when i use your version here with Aggr()

 

=Aggr(Maxstring({<[Expiry Date2]={"$(=MAX([Expiry Date2]))"}>}cert_attach),[Expiry Date2])

 

It looks correct but only shows the max record once i un filter everything. so this will not work.

 

Really appreciate your help, thanks

 

Daniel