Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
everest226
Creator III
Creator III

trim statement

HI i have a field Name PANACNO which his following values .

PANACNO

1:1-2-3-4-5

1:1-2-3-4-5-6

1:1-2-3/2:4-5-6

1:1-2-4-3

1:1-2/2:3-4

1:2-1

1:2-1-3

1:2-3

1:2-3-4

and my statement is following

if(len(PANACNO )>3,
mid(PANACNO ,
Index(PANACNO ,'-',-1) ),1)



which will give me value but with(-).  i only want number.

stalwar1

1 Solution

Accepted Solutions
Anonymous
Not applicable

please have a look

View solution in original post

17 Replies
m_woolf
Master II
Master II

What are you wanting to get?

everest226
Creator III
Creator III
Author

Last number ,basically

Anonymous
Not applicable

try subfield(PANACNO,'-',-1)

everest226
Creator III
Creator III
Author

No it doesnot give me any value beside ( -)

Anonymous
Not applicable

what result do you expect for?:

PANACNO

1:1-2-3-4-5

1:1-2-3-4-5-6

1:1-2-3/2:4-5-6

1:1-2-4-3

1:1-2/2:3-4

1:2-1

1:2-1-3

1:2-3

1:2-3-4

m_woolf
Master II
Master II

If you want to fix your expression:

if(len(PANACNO )>3,
mid(PANACNO ,
Index(PANACNO ,'-',-1) )+1,1)

everest226
Creator III
Creator III
Author

                                        Trying to capture

1:1-2-3-4-5                            5  

1:1-2-3-4-5-6                         6

1:1-2-3/2:4-5-6                        6

1:1-2-4-3                                 3

1:1-2/2:3-4                              4

Anonymous
Not applicable

... works for me:

LOAD SubField(PANACNO,'-',-1) as FIELD INLINE [

    PANACNO

    1:1-2-3-4-5

    1:1-2-3-4-5-6

    1:1-2-3/2:4-5-6

    1:1-2-4-3

    1:1-2/2:3-4

    1:2-1

    1:2-1-3

    1:2-3

    1:2-3-4

];

zebhashmi
Specialist
Specialist

right(PANACNO,1)