Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

[ASK] how to count certain character?

hello..

i wanna ask, how to count certain character in a word?

example, i have few records in a column

columnA

-------------

mine.A

mine.A.B

bye.A

bye.A.B.C

thanks.A

thanks.A.A.C.D

and i want to know hos much dot (.) character show in every records

how can i do that in qlikview?

many thx...

1 Solution

Accepted Solutions
Not applicable
Author

@richardo:

meaning your not using the dots as a delimiter??

try using this one(expression): =Len(Word)-Len(Replace(Word,'.',''))

View solution in original post

10 Replies
Not applicable
Author

You want to count the dots??

Not applicable
Author

@mOngkz

yes i do

but i dont know the function to do it

can anyone give me a hand please..

many thx...

Not applicable
Author

use subfield function:

Directory;

LOAD Word,SubField(Word,'.') as sub

FROM

[source.xlsx]

(ooxml, embedded labels, table is Sheet2);

in the expression tab:

Count(sub) - 1..because eventually the number of words is greater than the number of dots..if the dots are used as delimiter

Not applicable
Author

you can also use this in your expression: TextCount(SubField(Word,'.'))-1

to count the dots/delimiter.

Not applicable
Author

@mongkz

it almost rite, but doesnt rite

some times it tells two dots when the word have more then two dots

i really stuck n need a help really

😞

many many thx...

Not applicable
Author

@richardo:

meaning your not using the dots as a delimiter??

try using this one(expression): =Len(Word)-Len(Replace(Word,'.',''))

Not applicable
Author

@mongkz

it's perfect

thx a lot mongkz

really many thx to u

Not applicable
Author

I'am glad that I helped you.. I am new to qlikview too so I use this forum as my training ground.

Cool

johnw
Champion III
Champion III

I suspect this would work more efficiently:

substringcount(ColumnA,'.')