5 Replies Latest reply on Sep 22, 2018 12:37 PM by Motorola Licenses

# Count Occurrences

How can I count the number of times a particular series of numbers is present in a columns

 Column Name # of times starts with 426 or 436 426438 1 426459, 436458 2 426495 436965 426450 3 426458 / 436333 2
• ###### 1. Re: Count Occurrences

Hi Motorola

Here it is

If it Helps, Pl Mark it Helpful and CORRECT to Close Thread

Thanks

Deepak

• ###### 2. Re: Count Occurrences

Hi Motorola,

Try this , it will work

( len( [Column Name] )-len( replace([Column Name],"426","" )) ) / len("426")

+

( len( [Column Name] )-len( replace([Column Name],"436","" )) ) / len("436")

Here is my output

Thanks,

Ritesh

Please mark the answer as CORRECT & HELPFUL if it really helped you so that it can help others as well

2 of 2 people found this helpful
• ###### 3. Re: Count Occurrences

This helps...but another scenario if its possible to solve within Tableau

is it possible to further count number of 426 and 436 separately?

 Column Name # of times starts with 426 # of times starts with 436 426438 1 0 426459, 436458 1 1 426495 436965 426450 2 1 426458 / 436333 1 1
• ###### 4. Re: Count Occurrences

Definitely we can

426

=

( len( [Column Name] )-len( replace([Column Name],"426","" )) ) / len("426")

436

=

( len( [Column Name] )-len( replace([Column Name],"436","" )) ) / len("436")

Thanks,

Ritesh