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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
everest226
Creator III
Creator III

Subfield

hi i am using subfield in chart but somehow top two user UK709065 and UK703562 are not showing  basically it dosent have \ on that user

my expression of subfield is

=SubField([user],'\',2)

UK709065

UK703562

UTA\Ram

CAMPUS\Juliya

PHM\RAmtu






tamilarasu

stalwar1

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Maybe

=If(Index(user,'\'), SubField([user],'\',2), user)

View solution in original post

8 Replies
swuehl
Champion III
Champion III

Maybe

=If(Index(user,'\'), SubField([user],'\',2), user)

everest226
Creator III
Creator III
Author

Now i am getting 

UK709065

UK703562



but not this


UTA\Ram

CAMPUS\Juliya

PHM\RAmtu

sunny_talwar
MVP
MVP

Stefan's expression seems to be working for me

Capture.PNG

swuehl
Champion III
Champion III

Seems to work for me:

user test
CAMPUS\JuliyaJuliya
UK703562UK703562
UK709065UK709065
UTA\RamRam

LOAD *,

If(Index(user,'\'), SubField([user],'\',2), user) as test;

LOAD * INLINE [

user

UK709065

UK703562

UTA\Ram

CAMPUS\Juliya

];

surendraj
Specialist
Specialist

stefan's expression is working fine.

Here is the another one.

If(SubStringCount(data,'\')=1, SubField(data,'\',2), data)

everest226
Creator III
Creator III
Author

Thanks  

everest226
Creator III
Creator III
Author

Thanks Sunny

rwunderlich
MVP
MVP

Or

mid(user, Index(user,'\')+1)

-Rob