Formula to perform calculation using parameter associated with most recent date?

sanktjohan
sanktjohan ✭✭
edited 06/26/24 in Formulas and Functions

I'm trying to generate a column formula that will calculate 'Dose' using 'Concentration' and 'Purity' for each row, but only using the 'Weight' associated with the most recent 'Collection Date' grouped by 'Subject ID'.

For the example below, the Dose for Subject A (Test #2) should be:

Dose (A, Test #2) = (1.3 * 0.95)/(26)

image.png

I have tried using the MAX() and COLLECT() functions to pull the overall most recent Weight for a Subject ID, but am having difficulties with syntax and integrating it into the Dose formula. Bonus points if you can help generate a formula for Total Dose by summing the (Concentration * Purity) values for each row and dividing by most recent Weight by Subject ID. Appreciate the help!

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!