How to use hook_views to add calculation to a field? In a custom module (assoc), I have a custom Content Entity (Person) with these fields:

$fields['lastname'] = BaseFieldDefinition::create('string')
$fields['firstname'] = BaseFieldDefinition::create('string')
$fields['email'] = BaseFieldDefinition::create('email')
$fields['cellphone'] = BaseFieldDefinition::create('telephone')
$fields['balance'] = BaseFieldDefinition::create('integer')


I use Views to display a table of the persons. Here is the corresponding Views preview:

Before displaying the output, I'd like to add some value to the field 'balance':
balance = balance (of content entity) + somecredit - somedebit
'somecredit' and 'somedebit' being calculated by a query to the database.
What is the hook_views I should use ?
And how do I do?
Finally, after some (!!) digging, I did it in assoc_views_post_execute

function assoc_views_post_execute(ViewExecutable $view)
{
  switch ($view-&gt;id()) {
    case 'assoc_persons':
      if ($view-&gt;current_display == 'page_1') {
        $database = \Drupal::database();
        foreach ($view-&gt;result as $key =&gt; $value) {
          $person = $value-&gt;_entity-&gt;get('id')-&gt;value;
          $solde = $value-&gt;_entity-&gt;get('balance')-&gt;value;

          some code to calculate credit with database query
          $credit = $result[0]-&gt;credit;

          some code to calculate debit with database query
          $debit = $result[0]-&gt;debit;

          $solde = $solde + $credit - $debit;
          $value-&gt;_entity-&gt;set('balance', $solde);
        }
      }
      break;
    default:

  }
}