How do create a formula that add to line items?

My data is broken out in the statement of cash flows below is how my data is structured. If I wanted to combine Loan and revenue, add credit balance by quarter. What would be the best way? I also want to include a date field for card functionality.

Account Q1 Q2 Q3 Q4

Credit 10 15 20 25

Loan 20 25 30 35

Revenue 30 35 40 45