If you order the records in the table, you can then use the peek function to look at the previous record to populate to missing values. Something like this:
if(isnull(Cost), peek(Cost), Cost) AS Cost
ORDER BY [Material Number],YearMM;
Look like it's right direction, but i do have problem:
I have in this list many materials.
so i get this case:
on the right table, it "Before". on the left it "After" the manipulation.
as you can see, it took the last price from the previous Material to different material.
Any suggestion how to get over it?