Calculation based on met value within a field

Hi,

I’m trying to write a custom calculation where it would only occur if the value of a column is met and running in errors. For example, sum the salary and bonus if the employee is full time, not they’re not full time, sum just the salary, Would it be possible through something like this:

sum(
sumif({employee} = “Full-time”, sum{salary} + sum{bonus}, sum{salary})

sumif() function does not allow to specify ‘if not’ expression. therefore you have to use ifelse() like the below.
ifelse({employee}=‘Full-time’,{salary}+{bonus}, {salary})

and then configure Sum aggregation at visual level.