Q:

Repeat the column value until value change in same column value

My table structure:   
 declare  @TestTable as table
    (
        id int,
        somedate date,
        somevalue int
    )

    insert into @TestTable values
    (1,     '2019-01-01',   1000),
    (2,     '2019-01-02',   null ),
    (3,     '2019-01-03',   null),
    (4,     '2019-01-04',   null ),
    (5,     '2019-01-05',   800),
    (6,     '2019-01-06',   null),
    (7,     '2019-01-07',   null),
    (8,     '2019-01-08',   null),
    (9,     '2019-01-09',   null),
    (10,     '2019-01-10',   700)

Repeat the column value until any change  in value of column (somevalue).. Is it possible with window functions?
Required output:

A:

You can achieve that by using window function as well.
try the following:
select id, somevalue, newvalue=max(somevalue) over (partition by c)
from
(
    select id, somevalue
        ,c=count(somevalue) over (order by id)
    from @testtable
) t
order by id;

Please find the demo here.

