function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Helen VicoHelen Vico 

Formula for Unique Contact ID Counter for reports in Classic

Part of the org app has yet to transition to Lightning, so this question relates to Classic and Reports. I need to get a Unique Count of  PICKLIST FIELD linked to a Parent Object 
I can't use UNIQUE COUNT ID as it's CLASSIC. I'm hoping someone can assist, Thanks!
 
Need to create a report in salesforce on Campaign Members with the report type Campaign Members with Contacts that shows a unique count on;
  • Parent Object(Campaign Members) 
  • with Field 'Status': Value = 'Volunteers' - who are both active and inactive 
  • Per quarter
Currently, the Classic report with a cross filter shows the same volunteer multiple times.

My approach was to create a Formula Field on the Campaign Member Object.

The Formula, Datatype (Number), Advanced Formula
No of Volunteers CM (Number) = ISPICKVAL(Status, "Volunteer")

I'm getting the following error message
Error: Formula result is data type (Boolean), incompatible with expected data type (Number)
 
I'd welcome your input. Thanks
Best Answer chosen by Helen Vico
Helen VicoHelen Vico
I found a way by switching between Classic and Lightning and then back. As "Report builder" in Lightning was actually based on the "Classic Report builder". Reports & Dashboards were never built ground-up for Lightning. 2/ With that understanding, we can follow the rules: (a). A report created in Lightning could not be accessed in Classic but (b). A report created in Classic could be accessed AND edited in Lightning.

I created the report in Classic, then switched to Lightning to add the Unique Counter to the Full Name Column.
It is important that when editing the Column you don't put the cursor on the downward cursor on the top right of the column (still shows the Classic options) but instead to go to the EDIT button on the top right of the page and then go back to column to edit where the Unique Values option show up. Equally, if you switch back to Classic the Unique Value is lost. So either export data & save or each time you will have to switch back to Lightning and choose the Unique Values option to view the report.

Alternatively, just do the report in Lightning in the first place but some people have to do it in Classic!!! ;-)