As you are trying to combine values from multiple rows you'll need to use table calculations, which can be a bit tricky.
For your sample data you would need an expression like this:
PREVIOUS_VALUE("") + IIF(INDEX()==1,"",",") + ATTR([Sample field])
Then you will need to ensure that you have the correct level of detail returned on your view and set the partitioning appropriately.
Have a read about table calculations and if you get stuck, post a sample workbook showing how far you've got.