Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hai all,
Iam new to qlik
Can any one please explain about Substringcount function briefly, and how we can give the expression and how it will return the values please explain.
Thanks,
Suresh
Hello @Sureshbabukapu
Example | Result |
---|---|
SubStringCount ( 'abcdefgcdxyz', 'cd' ) | Returns '2' |
SubStringCount ( 'abcdefgcdxyz', 'dc' ) | Returns '0' |
Hope that helps.
Best regards
Sebastian
You can also use this expression to extract the substring (until the next space)
Given String = 'Qlik Sense 2021'
Substring = 'Sen'
Output = 'Sense'
=if(
SubStringCount(String,'Sen')>0, //check if substring exist
mid(String,
Index(String,'Sen'), //string position of the string
Index(Mid(String,Index(String,'Sen'),Len(String)-Index(String,'Sen')+1),' ') //number of chars that need to be extract (until the next space)
) ,'Substring not found')