Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
muniyandi
Creator III
Creator III

How to count char

Hi,

how to count the char, how many times in the field.

Ex: ('abcd,efgh,ijklm,nopqrs,tuvwxyz',',') i want Result  4

('abcd,efgh,ijklm,nopqrs,tuvwxyz','a') i want result 1

Thanks,

Muni

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi Muni,

=SubStringCount('abcd,efgh,ijklm,nopqrs,tuvwxyz',',') -> will return 4

=SubStringCount('abcd,efgh,ijklm,nopqrs,tuvwxyz','a') -> return 1

Regards,

Sokkorn

View solution in original post

7 Replies
sunilkumarqv
Specialist II
Specialist II

We are not geeting you Please explore what need to ask

Not applicable

try

substringcount( text , substring)

Returns the number of times the string substring appears within the string text. The result is an integer. If there is no match, 0 is returned

Example:

substringcount ( 'abcdefgcdxyz', 'cd' ) returns 2

Sokkorn
Master
Master

Hi Muni,

=SubStringCount('abcd,efgh,ijklm,nopqrs,tuvwxyz',',') -> will return 4

=SubStringCount('abcd,efgh,ijklm,nopqrs,tuvwxyz','a') -> return 1

Regards,

Sokkorn

Not applicable

hi

substringcount( text , substring)

Returns the number of times the string substring appears within the string text. The result is an integer. If there is no match, 0 is returned

Example:

substringcount ( 'abcdefgcdxyz', 'cd' ) returns 2

sunilkumarqv
Specialist II
Specialist II

Sokkorn is correct

Not applicable

Hi Mathew,

Let Inde=IndexLet Inde1=Index('abcd,efgh,ijklm,nopqrs,tuvwxyz','a');

Let Inde1=Index(''abcd,efgh,ijklm,nopqrs,tuvwxyz','a',1);

Let Inde2=Index(''abcd,efgh,ijklm,nopqrs,tuvwxyz','a',2);

Hope this will help you

Regards,

DJ

muniyandi
Creator III
Creator III
Author

Hi All,

Sokkorn answer is correct


Thanks to all.

Muni