Need to count each digit in a field
If I have a field that has the following values:
I need to count each of the numerical values only
4=3 and so forth
And how will you display those results? Separate calculations for each digit or did you have something else in mind?
Patterncount ( YourField ; "1" )
will return 4 when your field has the value you've shown as an example.
Your field is a Number or Text field? Where does the data come from? Can you count instances before it is aggregated?
What de the numbers represent? How many records are there? What version of FMP?
Is the count used for an infrequent report (temporary), or is the count of ones, twos an integral part of the data?
All results in one Field
Data will be Copied from excel sheet and pasted directly into a field
Just one record
Nothing special just need to count the digits.
Yes but you will have multiple counts in a single field apparently.
Let ( f = YourField ;
List ( "0 = " & PatternCount ( f ; "0" ) ;
"1 = " & PatternCount ( f ; "1" ) ;
"2 = " & PatternCount ( f ; "2" ) ;
..continue this pattern til the digit "9"
) // list
) // let
This returns the count of each digit in a list with a return separating each listed result.
Excellente'..... That works for me.
Retrieving data ...