Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Saravanan_Desingh

Associated Value

My Table has Fields Name & Modified.

I'm using the below code to get the Max Date

LOAD

Max(Date#([Modified],'M/D/YYYY h:mm TT')) As MaxDate

Resident [SP_T_$(i)]

  Where [Name] Like '*ServiceNow Patching Governance Report*'

Let vMaxDate=Peek('MaxDate');

Trace>>>vMaxDate='$(vMaxDate)';

Also I need to get the associated Name Field here. Can you help me. how to do it?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

LOAD  

FirstSortedValue([Name], -Date#([Modified],'M/D/YYYY h:mm TT') ) as MaxDateName,

Max(Date#([Modified],'M/D/YYYY h:mm TT')) As MaxDate 

Resident [SP_T_$(i)] 

  Where [Name] Like '*ServiceNow Patching Governance Report*' 

;   


Let vMaxDate=Peek('MaxDate'); 

Let vMaxDateName = Peek('MaxDateName');

Trace>>>vMaxDate='$(vMaxDate)';

Trace>>>vMaxDateName='$(vMaxDateName)'

View solution in original post

5 Replies
sunny_talwar

Not sure I understand what you are looking to do. Can you elaborate a little?

swuehl
MVP
MVP

Maybe like

LOAD  

FirstSortedValue([Name], -Date#([Modified],'M/D/YYYY h:mm TT') ) as MaxDateName,

Max(Date#([Modified],'M/D/YYYY h:mm TT')) As MaxDate 

Resident [SP_T_$(i)] 

  Where [Name] Like '*ServiceNow Patching Governance Report*' 

;   


Let vMaxDate=Peek('MaxDate'); 

Let vMaxDateName = Peek('MaxDateName');

Trace>>>vMaxDate='$(vMaxDate)';

Trace>>>vMaxDateName='$(vMaxDateName)'

Saravanan_Desingh
Author

Hi Sunny,

My Table looks like:

  

NameModified
ServiceNow Patching Governance Report - 2016-05-025/2/2016 10:26 AM
ServiceNow Patching Governance Report - 2016-05-045/4/2016 6:19 AM
ServiceNow Patching Governance Report - 2016-05-065/6/2016 10:08 AM
ServiceNow Patching Governance Report - 2016-05-095/9/2016 8:35 AM
ServiceNow Patching Governance Report - 2016-05-11

5/11/2016 8:43 AM

I am looking for the last File from this list. Here 5/11 th File which is ServiceNow Patching Governance Report - 2016-05-11

sunny_talwar

I believe Stefan has already provided a solution

Saravanan_Desingh
Author

Thank you Stefan.. It worked..