Converting Monthly Rolling SUM (YTD) back to Monthly numbers
select name,period
    ,amount-lag(amount,1,0) over (partition by name order by period)
from table1




with cte as 
( 
     select *
           ,row_number() over (partition by name order by period) as rn
      from table1
 )
 select t1.name,t1.period
       ,t1.amount-coalesce(t2.amount,0)
 from   cte as t1
        left join cte as t2
        on t2.rn = t1.rn-1