Identifying the max value for a specific field
Hi, i do like a dilemma it seems...
I have a list with 2 fields (well lots but 2 that matter) Bvfsku and Vintage
I want to add a field that indicates the one that has the latest vintage (2018 in this example)
So a boolean or a number field that is set to TRUE or 1 if the Vintage is the latest year....
How can i do that please?
Answers not on postcard please, thanks in advance
Kev
Best Answer
-
Hi,
Your Bvfskus column should be list formated to get this. If your column is text format, create another line item and convert into List format using FINDITEM.
Try this.
Regards,
Vignesh M
2
Answers
-
Hi,
Use Max as summary of the vintage line item and use the below logic.
Regards,
Vignesh M
0 -
1. Set up a Lookup module (no dimensions) in which you set the vintage year. You can calculate this from the Current period (if that is what you want)
In the above, Target year is formatted as Year and Year is formatted as a number
I hope that helps
David
0 -
but i have 2000 Bvfskus, so i need to find the maximum year for each Bvfsku, not all bvfsku's
0 -
Sorry David, i don't need to find the current year, i need to find the last vintage for each bvfsku (We have 2000+) so if the last was 2016 then i can identify it as such.
0 -
Have a look at this
https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/xMAX_y.html
I think this is what you need - You might need another line item to hold the name/code of the list item and then bring that through. You could then use that to match
You might also need the FIRSTNONBLANK aggregation to move the formatted list items between modules
Have a look here too
https://help.anaplan.com/anapedia/Content/Calculation_Functions/CF_Aggregation_Functions.html
Hope this helps
David
David
1 -
HI @DeveloperCYT,
Try my below approach!!
Step 1: Create below line items in your module and apply the formula.
Step 2: Create a module with 'Bvfsku' list and create one line item.
End Result:
Note: 1. You should have 'Bvfsku' list if not please create. 2. If you have 'Year' as a number formatted then you can directly refer else convert by the above approach.
I hope this helps!
Regards,
Kavin.0 -
2 simple solutions depending on your list structure
1. Assuming you have a composite list
You can use the MAX summary method and a LOOKUP on the parent of the list
2. Assuming it is not a composite list, but you still have the attibributes
Create a module by the attribute using the MAX aggregate parameter and then use a LOOKUP similar to 1.
Hope that helps.
David
0