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

Announcements
Congratulations to the new Qlik Luminary and Partner Ambassador class! Meet them here
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
MVP
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
MVP
MVP

another possible solution without subfield()

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

 

View solution in original post

5 Replies
rwunderlich
MVP
MVP

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

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

MarcoWedel
MVP
MVP

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
MVP
MVP

You're welcome.

Please close this thread by accepting a solution. 

Thanks