I keep getting errors like this:

Error:field Appointment_Scheduled__c does not support aggregate operator SUM

Where Appointment_Scheduled__c is a boolean.

Same error with COUNT or AVG.

What is the best way to count the number of times that a boolean is true in an aggregate model?

Thanks!

Error:field Appointment_Scheduled__c does not support aggregate operator SUM

Where Appointment_Scheduled__c is a boolean.

Same error with COUNT or AVG.

What is the best way to count the number of times that a boolean is true in an aggregate model?

Thanks!

Matt Sones, Champion

- 31,986 Points

Posted 4 years ago

Rob Hatch, Official Rep

- 44,678 Points

You want to group the boolean field and then aggregate on some other field, maybe an ID (COUNT).

If you really only want to know how many times the boolean is true - (And don't care about the false) - then put the boolean field in a condition and aggregate on ID as above.

If you really only want to know how many times the boolean is true - (And don't care about the false) - then put the boolean field in a condition and aggregate on ID as above.

Matt Sones, Champion

- 31,986 Points

Hmm. Ok.

I want to group on a different field (a picklist), and then count how many times the boolean is true for records in each picklist category. I was hoping to re-use a model that I already have to count total records, but it looks like I'll have to create a new model with a boolean = true condition to count those.

I want to group on a different field (a picklist), and then count how many times the boolean is true for records in each picklist category. I was hoping to re-use a model that I already have to count total records, but it looks like I'll have to create a new model with a boolean = true condition to count those.