Need Help With a mesure to calculate Customer Balance by Invoice

Hello!

I have this data:

Customer Date Invoice # Total Payment # Payment Balance
1 10/7/2023 13393 $ 2.000,00 7404 $ 500,00 $ 1.500,00
1 10/7/2023 13393 $ 2.000,00 7406 $ 100,00 $ 1.400,00
1 13/10/2023 13394 $ 1.000,00 7404 $ 300,00 $ 700,00
1 10/10/2023 13394 $ 1.000,00 7406 $ 100,00 $ 600,00

I need to create the column Balance with a measure to insert in a table visual.

This column should show the balance due per invoice, look that for the same number of invoice, each payment substract the amount from the previous balance.

Can anyone help me with this?
Data Example.xlsx (14.5 KB)