Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jpjust
Specialist
Specialist

Subfield

Hi,

I have an expression in load script as below.

Subfield(AppName,'(',1) as AppName,

I want to apply subfield only for App names like TEST(1) not for App names like TEST(w) or sample(w)

Essentially, don't apply sub field where app names do not contain (1) 
How can I achieve it?

Thanks

2 Solutions

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

if(AppName like '*(1)', Subfield(AppName,'(',1), '') as AppName,

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

MarcoWedel

another possible solution without subfield()

Left(AppName,Index(AppName,'(1)')-1)

 

View solution in original post

5 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

if(AppName like '*(1)', Subfield(AppName,'(',1), '') as AppName,

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

MarcoWedel

another possible solution without subfield()

Left(AppName,Index(AppName,'(1)')-1)

 

jpjust
Specialist
Specialist
Author

Thank you Rob!!

jpjust
Specialist
Specialist
Author

Thank you Marco

MarcoWedel

You're welcome.

Please close this thread by accepting a solution. 

Thanks