Latest Price for Material base on Invoice

Good Morning Epicor Community, how can I get latest price for material base on invoice? I tried using MAX() but I get multiple lines with different date, you guys can refer my dashboard image below.

image

Does PartCost not have the info you need in LastmaterialCost?

If not a top 1 subquery sorted in descending order grouped by part should work.

here is a thread.