Custom expression problems


I am trying to build custom expression to show percentage of comparison with two fields that are joint data tables. I want to get the percentage of activities done based on goals.

But I cannot get the CountIf expression to work. Example what I tried:

SumIf([Goal], between([month of goal], "2024-01-01", "2024-12-31")) / CountIf([Type of activity], between([Created date], "2024-01-01", "2024-12-31"))

But I always get Syntax error no matter what Count formula I try. Anyone has solution ideas to this? Do I need to create custom column first for this?

you're trying to do a share right?

Yes correct. Countif just seems to work differently than Sumif so it always gives me formatting error.