Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
rsdhavle
Creator III
Creator III

Calculating max date for PRODUCT in Load Script

I have list of Products and some execution dates are getting generated against them link below

PROD   Date

A             12/06/19

B             12/06/19

A             15/06/19

A             16/06/19 

B             14/06/19

C            12/06/19

 

I want to calculate max date against each PROD execution at Script level so that it will show PROD and Max Data against it in Date column

How can I calculate this in Load Script?

Labels (1)
1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

After loading the products and dates (into table 'Data' for example):

Left Join(Data)
LOAD PROD, 
	Max(Date) as ProductMaxDate
Resident Data
Group By PROD;

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein