Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

len() in qlikview

Hi Everyone,

I have one field contains different number of characters records.

From Name field I need to calculate

1. count of Number of characters which are less than 4

2. count of Number of characters which are greater than 6



I have taken len(Name) in text object by selecting each record i am able to see the count. But to get <4 characters count how to write the syntax.

Name.png

Thanks in Advance.

1 Solution

Accepted Solutions
5 Replies
Chanty4u
MVP
MVP

try this

If(Len(FIeld) <4,1,0) as new

MarcoARaymundo
Creator III
Creator III

Try

If(Len(Field) < 4, Len(Field),

    If(Len(Filed) >6, Len(6),

          ''

    )

)                                             as NewFiledLen

Chanty4u
MVP
MVP

check simple example here

length function | Qlik Community

jonathandienst
Partner - Champion III
Partner - Champion III

In the front end or in the script?

If  the former, depending on the context:

Sum(If(Len(Name) < 4, 1, 0))

and

Sum(If(Len(Name) > 6, 1, 0))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
pradosh_thakur
Master II
Master II

in text box 1 expression

=count({<[Name]= {"=len([Name])<4"} >} DISTINCT [Name])

Another text box

=count({<[Name]= {"=len([Name])>6"} >} DISTINCT [Name])


regards

Pradosh

Learning never stops.