Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My min date on a table varies by part number and represents the first date the part was manufactured so I can't set a defined number for the start date. Is there a formula/script to look up the first date the part was manufactured and set that as my min date and have my max date be today (the date selected)? This should give me a total manufactured from the first date to the date selected.
Thanks for the help,
Venus
Venus,
where do you want to use the min date per part number and the date selected (in which context, chart)?
What do you want to show?
Could you post some sample lines of your data togehter with the expected outcome?
Hello Venus,
As swuehl has indicated that it would have been better to understand your requirement, had you posted some sample. Still, here are some options you can try based on your requirement:
You can use aggregation function MIN like,
LOAD
part number,
MIN(DateField) as MinDate,
.....
FROM .....GROUP BY part number ...;
or if you need a single minimun date from the entire table, you can try something like,
LOAD part number,
DateField,
......
FROM ...... ORDER BY DateField;
then use peek function - PEEK('DateField',0) to get the minimum date and store in a variable.
Hope this helps.
Regards,
tresesco
... and, if you want to use it on front end rather than in script, use aggr:
aggr(min(DateField),"Part Number")