Forum Discussion
QuickBaseCoachD
9 years agoQrew Captain
This formula will require no maintenance. Just don't have a semi colon in one of the choices though.
Try this
var text value = ToText([Multi select]);
Count(
Trim(Part($value,1,";")),
Trim(Part($value,2,";")),
Trim(Part($value,3,";")),
Trim(Part($value,4,";")),
Trim(Part($value,5,";")),
Trim(Part($value,6,";")),
Trim(Part($value,7,";")),
Trim(Part($value,8,";")),
Trim(Part($value,9,";")),
Trim(Part($value,10,";")),
Trim(Part($value,11,";")),
Trim(Part($value,12,";")),
Trim(Part($value,13,";")),
Trim(Part($value,14,";")),
Trim(Part($value,15,";")),
Trim(Part($value,16,";")),
Trim(Part($value,17,";")),
Trim(Part($value,18,";")),
Trim(Part($value,19,";")),
Trim(Part($value,20,";"))
)
Try this
var text value = ToText([Multi select]);
Count(
Trim(Part($value,1,";")),
Trim(Part($value,2,";")),
Trim(Part($value,3,";")),
Trim(Part($value,4,";")),
Trim(Part($value,5,";")),
Trim(Part($value,6,";")),
Trim(Part($value,7,";")),
Trim(Part($value,8,";")),
Trim(Part($value,9,";")),
Trim(Part($value,10,";")),
Trim(Part($value,11,";")),
Trim(Part($value,12,";")),
Trim(Part($value,13,";")),
Trim(Part($value,14,";")),
Trim(Part($value,15,";")),
Trim(Part($value,16,";")),
Trim(Part($value,17,";")),
Trim(Part($value,18,";")),
Trim(Part($value,19,";")),
Trim(Part($value,20,";"))
)
GeorgeKhairalla
4 years agoQrew Cadet
I know this is an old thread, but I was searching for a solution and stumbled on my own question :)
I have a different scenario requiring the same formula. In this case, I am creating a Summary Report, with a Report Formula containing the above, to DISTINCT count the number of items in the text list.
It's working great, except for one detail: It's counting the empty values. Is there a way to adjust the above formula to avoid the empty values?
I have tried the Nz() but that didn't seem to do the trick.
I also tried to add an if statement on each Trim Line
If(Trim(Part($value,1,";")) <> "", Trim(Part($value,1,";")),"")
That also didn't seem to work.
Any other ideas?
------------------------------
George Khairallah
CTO
gotomyerp, LLC
------------------------------
I have a different scenario requiring the same formula. In this case, I am creating a Summary Report, with a Report Formula containing the above, to DISTINCT count the number of items in the text list.
It's working great, except for one detail: It's counting the empty values. Is there a way to adjust the above formula to avoid the empty values?
I have tried the Nz() but that didn't seem to do the trick.
I also tried to add an if statement on each Trim Line
If(Trim(Part($value,1,";")) <> "", Trim(Part($value,1,";")),"")
That also didn't seem to work.
Any other ideas?
------------------------------
George Khairallah
CTO
gotomyerp, LLC
------------------------------
- MarkShnier__You4 years ago
Qrew Legend
Can you post your whole formula?
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------- GeorgeKhairalla4 years agoQrew CadetSure.. it's actually exactly the one suggested in this thread:
var text value = ToText([Product Add-On Apps]);
Count(
Trim(Part($value,1,";")),
Trim(Part($value,2,";")),
Trim(Part($value,3,";")),
Trim(Part($value,4,";")),
Trim(Part($value,5,";")),
Trim(Part($value,6,";")),
Trim(Part($value,7,";")),
Trim(Part($value,8,";")),
Trim(Part($value,9,";")),
Trim(Part($value,10,";")),
Trim(Part($value,11,";")),
Trim(Part($value,12,";")),
Trim(Part($value,13,";")),
Trim(Part($value,14,";")),
Trim(Part($value,15,";")),
Trim(Part($value,16,";")),
Trim(Part($value,17,";")),
Trim(Part($value,18,";")),
Trim(Part($value,19,";")),
Trim(Part($value,20,";"))
)
This formula is being used as a report formula field in the Summary Report.
------------------------------
George Khairallah
CTO
gotomyerp, LLC
------------------------------- MarkShnier__You4 years ago
Qrew Legend
try this
var text value = ToText([Product Add-On Apps]);
Count(
Trim(Part($value,1,";"))<>"",
Trim(Part($value,2,";"))<>"",
Trim(Part($value,3,";"))<>"",
etc etc
Trim(Part($value,20,";"))<>"")
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------