John-S Pretorius
asked on
Count string value instances seperated by a comma in field
I have a string value {dbo.CharConfidence} field that typically has 7 values separated by a comma (82,81,81,85,93,67,8) I am looking for a formula that will count the individual 'instances' separated by a comma. the example mentioned in bold = 7
Are you sure you want to do this in Crystal Reports? Which db are you using? Will it be acceptable to have solution there instead?
ASKER
Thank you for your response Nitin, I run Crystal reports against a SQL database. Crystal also has some limited ability to do SQL queries. Crystal reports is what I typically use so it seems like the way to go.
ASKER
In playing with some available commands I found the below statement that seems to be working in Crystal Reports :-
Ubound(Split({ZapData.Char Confidence },","))
Ubound(Split({ZapData.Char
ASKER
To add some additional findings, it seems I'm closer but still have some challenges. Should my value have for example 7 commas as expected but the last value is 'null' (71,100,63,100,100, ) the results is also 7. The result for the example mentioned in brackets should = 6
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you and as always great solution.