COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: mjklunk on 31 Oct 2013 03:58:54 PM

Title: Counting substring occurences in a string
Post by: mjklunk on 31 Oct 2013 03:58:54 PM
I am looking for a way to count the number of times 'SL' occurs in a string such as 'SL,CR,SL,LT,PK'
Title: Re: Counting substring occurences in a string
Post by: blom0344 on 11 Nov 2013 12:17:38 PM
compare the length of the original string value to a dataitem that defines a replace of SL with '' (empty string) and divide the difference by 2