List that sums a quantity

Hello to the entire Community.

This is the question:
I have a list of items ([Related LINALBs]) that, among other columns, has [REF] and [AMOUNT].
I want to print a PDF but only with the elements ([REF]) that add up to a certain AMOUNT.
Practical case:
The sum of [AMOUNT] of [Related LINALBs] is €5,000 but I want only elements to appear in the PDF until they total €1,000 (approximately).

Thank!!!

SOLUCIONADO !!!

Crear una VC [SUMA_LINEAS]:

SUM(SELECT(LINALB[TOTAL], AND([IDALB] = [_THISROW].[IDALB], [_THISROW].[_ROWNUMBER] <= [_ROWNUMBER])))

En el PDF:

<<FILTER(LINALB, AND([IDALB]=[_THISROW-1].[IDALB], [SUMA_LINEAS]<=[_THISROW-1].[DEPOSITO]))>>

La columna [DEPOSITO] es el IMPORTE.

El resultado se aproxima a la IMPORTE. Siempre será algo mayor.