Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Champion III
Champion III

5 Replies
Highlighted
Champion III
Champion III

try this

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

Highlighted
Creator III
Creator III

Try

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

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

          ''

    )

)                                             as NewFiledLen

Highlighted
Champion III
Champion III

Highlighted

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
Highlighted
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.