Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
mahendragaur
Creator
Creator

Subfield

Hello All,

I want to get the name from a column which contains either 'x' or 'X' character in between Name and Age. How can I get name using or functionality in SubField?

   

Mahendra X 22
Prasad x 55
Pranav
Mahendra x 11
Prasad X 54
Pranav
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Try below

LOAD SubField(Name,if(findoneof(Name,'X'),' X ',' x '),1) as NAME,SubField(Name,if(findoneof(Name,'X'),' X ',' x '),2) as Age Inline [

Name

Mahendra X 22

Prasad x 55

Pranav

Mahendra x 11

Prasad X 54

Pranav

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

12 Replies
Anil_Babu_Samineni

What was the expected output here

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Not applicable

hi ,

use subfield('fieldname','symbol(X)')

Regards,

Balakrishnan.R

mahendragaur
Creator
Creator
Author

Expected Output:

   

Mahendra
Prasad
Pranav
Mahendra
Prasad
Pranav
vinieme12
Champion III
Champion III

Try below

LOAD SubField(Name,if(findoneof(Name,'X'),' X ',' x '),1) as NAME,SubField(Name,if(findoneof(Name,'X'),' X ',' x '),2) as Age Inline [

Name

Mahendra X 22

Prasad x 55

Pranav

Mahendra x 11

Prasad X 54

Pranav

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anil_Babu_Samineni

Use this

LOAD SubField(Name,' ',1) as Name, RowNo() as ID Inline [

Name

Mahendra X 22

Prasad x 55

Pranav

Mahendra x 11

Prasad X 54

Pranav

];

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
annafuksa1
Creator III
Creator III

try

SubField(YourField,' ',1)

vinieme12
Champion III
Champion III

or Just This

LOAD subfield(Capitalize(Name),' X ',1) as Name Inline [

Name

Mahendra X 22

Prasad x 55

Pranav

Mahendra x 11

Prasad X 54

Pranav

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
gerry_hdm
Creator II
Creator II

you are work with uper

Load *,
upper(subfield( uppername , 'X' ,1)) as NameNew2
;
load
upper(Name) as uppername,
upper(subfield( Name , 'X' ,1)) as NameNew



inline [Name
hallo x 22
hallihallo
myname X 46
]
;
greetings gerry

mahendragaur
Creator
Creator
Author

Thank you Buddy.