sharepoint online – Subtract amount from one column to another column on a site based on expense code

I am fairly new to SharePoint online and Power Automate and looking for a solution to do the following:

I have two lists

  • List 1: Budget name, Expense Code, Allowance and Total Budget available.
  • List 2: Item Name, Amount, Expense Code

I’m looking at a way for list one to be updated, with the value from amount on List 2 subtracted based on the expense code used.

For example:

If I input one laptop at £200 using expense code EA4 then List one will update to have that amount removed from the budget name & amount and figure populated in total budget available.

Any suggestions or guidance as I’ve been looking but can’t seem to figure it out or find a way.