Skip to main content
Question

Counting Varies Depending on Multiple Choice Selected

  • Mar 28, 2019 6:59 PM UTC
  • 0 replies
  • 118 views

I have a multiple choice field that displays the following:

-NONE
-A
-B
-C
-D

I need a new formula field that displays "0" if NONE is selected and then if any other letters are selected to add them up.

So if unit

101 needs BD = 2
102 NONE = 0
103 AD = 2
104 C =1

Please help me with the formula.  I tried looking in the knowleadgebase but didn't see a case where if a certain selection in my case NONE would equal to "0" and count if any others.

I can provide screenshots if needed.
This topic has been closed for replies.

Forum|alt.badge.img+11
It was unclear, but I think you are counting the number of characters in the multiple choice. Am I correct?
If so, this numeric formula might do it:
If(
     [Letters Field] = "NONE", 0,
     Length([Letters Field])
)

  • Author
  • Qrew Corporal
  • Mar 28, 2019 7:51 PM UTC
That is correct, I want to count each letter as +1 only.  If NONE is selected then it should say 0

I tried this:
If([Tubs Needed]="NONE",0,Length([Tubs Needed]))

and received this error on the = sign

The operator '=' can't be applied to on types textlists text

I am using a Formula Text field.  



  • Qrew Member
  • Mar 28, 2019 7:58 PM UTC
I'd suggest using a numeric formula field if possible because I think you're looking for a number as the output of your formula.  If you wanted to keep using a text formula field you might be able to use this formula based on what you provided:

If([Tubs Needed]="NONE","0",ToText(Length([Tubs Needed])))

Though for reporting purposes a numeric field seems like the way to go

  • Author
  • Qrew Corporal
  • Mar 28, 2019 8:29 PM UTC
I want to use formula numeric field. I tried this:


  • Qrew Member
  • Mar 28, 2019 8:36 PM UTC
Have you tried going back to the Length([Tubs Needed])  instead of the Count argument you're using at the end of your If-Statement?

Jake Rattner | Solutions Architect
(847) 927-1427 | jrattner@quandarycg.com
Quandary Knowledge Base