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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to count the number of words /alphabet in a sentence

Hi,

Can we count the number of words /alphabet used in the comments for different ID .

For example :-

For ID =1 its comments include 23 alphabets.

Thanks your suggestions in advance

   

IDComments
1Every company has expenses.
2This Expense Management application provides you with a way to discover unexpected expenses and track employee spending.  With the power of data association, QlikView helps you identify ways to save money for your organization.
3 Every sales or services company has traveling costs.  But most expense tools don't give you the insight information about how the expenses were spent.
1 Solution

Accepted Solutions
qv_testing
Specialist II
Specialist II

Hi,


Len(Your Dimension )

View solution in original post

7 Replies
qv_testing
Specialist II
Specialist II

Hi,


Len(Your Dimension )

Kushal_Chawda

=len(keepchar(lower(trim(Comments)),'abcdefghijklmnopqrstuvwxyz')) as NumberOf Alphabets

prat1507
Specialist
Specialist

Maybe this

=Len(replace([Business Unit],' ',''))

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Shweta,

Use Below Code

Load ID,

Comments,

Len(Comments) as COM_LEN

From....

Thanks,

Arvind Patil

techvarun
Specialist II
Specialist II

Try this for Alphabet count

Len(Comments) -substringcount( Comments ,' ')

Word count is typically number of spaces+1


substringcount( Comments ,' ') +1

Not applicable
Author

LOAD

  *

  // Count what is left here...

  ,Len(CommentsCleaned)-Len(PurgeChar(CommentsCleaned, ' ')) as NumberOfWords

  ,Len(PurgeChar(CommentsCleaned, ' ')) as NumberOfCharacters

;

LOAD

  *

  // Remove things you don't want to count here...

  ,Replace(Comments, '.','') as CommentsCleaned

;

LOAD * INLINE [

    ID, Comments

    1, Every company has expenses.

    2, "This Expense Management application provides you with a way to discover unexpected expenses and track employee spending.  With the power of data association, QlikView helps you identify ways to save money for your organization."

    3, "Every sales or services company has traveling costs.  But most expense tools don't give you the insight information about how the expenses were spent."

];

Frank_Hartmann
Master II
Master II

Straight Table:

Dimension = ID, Commnets

Expression:

count(subfield(Comments,' '))