Hi @igfasouza,
When dealing with errors like this, like mismatched aggregations, you’ll have to incorporate the usage of Level-Aware Calculations (LAC).
Looking at your calculated fields, I would suggest that you explore the CountOver function as opposed to the regular ‘count’.
Let me know if this works for your case or if you have additional questions.