Looks rather straightforward, since the detail table already contains the Position the person was in on that given day.
If you could post useable sample data -- CREATE TABLE and INSERT statements -- for the sample data above, I could work up a query. I do think you'll need dynamic SQL to dynamically compute the formula, I don't see any easy way around that.
SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.