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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
risabhroy_03
Partner - Creator II
Partner - Creator II

Find Effective Date

I have a table below - 

[A_Stage_2]:

Load
Company_Code,
"T$CPRJ" as [Project],
num("T$CPCC") as [Price Calculation Code],
"T$PITM" as [Parent Item],
"T$BPID" as [Subcontractor],
"T$TANO" as [Task],
"T$SEQN" as [Sequence No.],
"T$CCUR" as [Currency],
"T$SCRT" as [Subcontracting Rate],
"T$CMSC" as [Calculation Method for Subcontracting Costs],
"T$SRMC$1" as [Subcontracting Rate Multi Currency],
"T$CPCP" as [Cost Component],
"T$ITEM" as [Subassembly],
"T$EFDT" as [Effective Date],
"T$EXDT" as [Expiry Date],
"T$CRDT" as [Creation Date]


FROM [$(vSource)\TTIUIL160.qvd](qvd);

I have to pick Data based on the [Effective date] and the condition is as below - 

1) I have to pick unique data based on [Company Code],[Parent Item],[Subcontractor] and [Task].

2) I have to only pick those [Effective Date] which is the maximum for the above 4 fields and  [Effective Date]<=Today().

For example, if I am getting like this I have to pick the first record 

Company Code Parent Item Sub-Contractor Effective Date Expiry Date
215 11ARY05420 CON000706 10-09-2019 01-10-2019
215 11ARY05420 CON000706 08-09-2019 05-10-2019

 

Labels (1)
0 Replies