Last Occurrence Type question

Highlighted
Occasional Contributor

Last Occurrence Type question

Hi there, 

 

I am looking to get the latest product code based on two identifiers, one is called BVFSKU and the other is Vintage:

 

Module one is called Latest FERT - module to pull the data in to and based on the BVFSKU list

Module two is called Masterdata - module containing all of the data needed and based on a list called masterdata. 

 

So what I would like to do is lookup the BVFSKU in the Masterdata module and find the product codes that match this criteria but then also return the latest product code. The masterdata list is a numbered list so that could provide the latest entry, but we use a display field so we can't see this number

 

Screenshot 2020-08-17 at 16.45.25.png

 

Screenshot 2020-08-17 at 16.47.32.png

 

 

Hoping someone can help

 

 

3 REPLIES 3
Highlighted
Certified Master Anaplanner

Re: Last Occurrence Type question

pknight@cyt-uk.com 

 

I am not that clear with the screenshot.  Is the BVFSKU list in the Latest FERT module is actually the combination of Vintage and BVFSku in the Masterdata module?

 

I think you can use RANK function to rank each occurrence in Masterdata module and then compare it with the total count for each BVFSKU.  The latest product code is that with Rank is equal to Total Count.

 

Regards,

Andre

 

Highlighted
Occasional Contributor

Re: Last Occurrence Type question

Hi Andre, 

 

BVFSKU and Vintage are both properties within the Masterdata module. I will certainly take a look at the RANK function and see what it brings back.

 

Thank you 

Phill

 

Occasional Contributor

Re: Last Occurrence Type question

Hi @andre.lie 

 

The RANK solution worked perfectly so thank you for your help

 

Phill