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

String Question

Hello all,

I have a question for you.  I have a string that I only want to extract up to the first ' - '.  How would I do this?

Example:

AR Analysis -

Sales Analysis -

CRM Stats -

Thanks

Thom

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

SubField(TextBetween('d:\accesspoint\ar analysis -  133531  _  youngstown-fs.qvw','\',' -'),'\',-1) as YourOutput

or

SubField(TextBetween(YourFieldName,'\',' -'),'\',-1) as YourOutPut

View solution in original post

7 Replies
sunny_talwar

May be this:

SubField(MyString, ' -', 1) as MyNewString

MK_QSL
MVP
MVP

Trim(SubField(MyString,'-',1)) as MyNewString

tmumaw
Specialist II
Specialist II
Author

Sunny T,

Here is what I got and all I need out of the string is ar analysis. I need to strip off the d:\accesspoints\ and - 135131 _ youngstown-fs.qvw

Thanks

Thom

d:\accesspoint\ar analysis -  133531  _  youngstown-fs.qvw
tmumaw
Specialist II
Specialist II
Author

One thing to remember it might be ar analysis or crm stats or billing analysis

MK_QSL
MVP
MVP

SubField(TextBetween('d:\accesspoint\ar analysis -  133531  _  youngstown-fs.qvw','\',' -'),'\',-1) as YourOutput

or

SubField(TextBetween(YourFieldName,'\',' -'),'\',-1) as YourOutPut

tmumaw
Specialist II
Specialist II
Author

Thanks Manish.....It worked perfect.

tmumaw
Specialist II
Specialist II
Author

Thanks everyone for your help.