If condition in Kibana Table Visualization

I have the data about the transactions made by the users and also about the accounts that made those transactions. I need to count how many accounts there are and how many pix there were and if the amount of accounts is less than 100 and the amount of pix is less than 500, the total cost will be 2,000.00, if the amount of accounts is less than 200 and the amount of pix less than 1000, the total cost will be 4,000.00.

The formula I'm still building because I'm a beginner in elastic, but the condition would be like count(operations.keyword pix.sent) + count(operations.keyword pix.received) <500 and unique_count(account_id.keyword) <100 then

image