Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
grakeshqvd
Contributor III
Contributor III

How to get ID and Name using Latest availavle date using Qlikview script(Please find attachment)

IDName StatusDate
101PLANHold5/16/2019
101PLANNo Issue5/9/2029
102ApprovalResolved5/9/2019
102ApprovalHold5/16/2019
103ScopeHold5/19/2019
103ScopeResolved5/16/2019

 

IDName StatusDate
101PLANHold5/16/2019
102ApprovalHold5/16/2019
103ScopeHold5/19/2019

 

 

7 Replies
tresesco
MVP
MVP

If you are looking for 'hold' only information, try like:

Dim 1 : ID

Dim 2 : Name

Dim 3 : If(Status= 'Hold', Status)

Exp : Date(Max(Date))

 

And, enable 'Suppress When Value Is Null' for third calculated dimension 

PrashantSangle

where you want to achieve it in front end or back end??

in back end
Load * from tableName
where status='Hold';

in front end
take
Dimension : ID, Name, Status
Expression : Date(Max({<Status={'Hold'}>}Date))
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Frank_Hartmann
Master II
Master II

If you are looking for the max Date per ID then try following code:

 

tmp0:
LOAD Status,
Name,
ID,
Date
FROM
[https://community.qlik.com/t5/New-to-QlikView/How-to-get-ID-and-Name-using-Latest-availavle-date-usi...]
(html, codepage is 1252, embedded labels, table is @1);

left join
Load ID,max(Date) as Date, FirstSortedValue(Name,-Date) as Data Resident tmp0 Group by ID;

NoConcatenate

Final:
Load * Resident tmp0 Where Data<>Null();DROP table tmp0; DROP Field Data;

 

 

grakeshqvd
Contributor III
Contributor III
Author

Hi prasanth,

We need it Back end script side only.

Actually, we have already one filed having all the values like for example...

IF(Token='Review' AND DATE(Datefield,'M/D/YYYY')>DATE(Startdate,'M/D/YYYY'),'Review Item',

IF(Type='Release','Release Type')) As Required.

 

We need to include that value in the "Required" field.

currently, Required field having values (Review Item and Release Type) same like we need add MaxDate(ID and Name) Value in to Required Field like I have attached document.

 

PrashantSangle

Sorry i did not get you. can you share sample data with expected output.

the logic which I have share, will work as per earlier sample data. If it is not satisfying your requirement then share sample data as per format which you have now.

 

regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
grakeshqvd
Contributor III
Contributor III
Author

Hi Prasanth,

 

Please find attached.

 

Regards,

Rakesh

Brett_Bleess
Former Employee
Former Employee

I suspect what the guys wanted here was a sample qvw file, not the Word Doc, so if you can attach that, they may get back to you on things.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.