Thank you Mark and everyone who replied, many thanks for all the help.
I am now using this code
STRSTORECODE as STORE,
IT.STRXREFCODE as ARTICLE,
IT.STRFAMILYCODE as FAMILY,
DBLSTOCKONHAND as [Article Level Qty],
SUM([DBLSTOCKONHAND]) OVER(PARTITION BY IT.STRFAMILYCODE) AS [Family Level Qty],
SUM([DBLSTOCKONHAND]) OVER(PARTITION BY STRSTORECODE) AS [Store Level Qty]
from STORERNG SR
join ITEM AS IT on IT.LINTITEMNUMBER=SR.LINTITEMNUMBER
Where STRSTORECODE in ('SL07','SL10')
and DBLSTOCKONHAND <>'0'
order by STRSTORECODE,IT.STRXREFCODE,IT.STRFAMILYCODE
Which returns me
Because it's combining the family stocks for 2 stores.
I would like to Separate out or group the Family by store.
How am i able to achieve it?