Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
piyush_s11
Creator
Creator

Qlik Sense find specific value from a string

Hi,

I have attached an excel sheet. In that excel sheet from column A I wanted to separate a specific value which starts  with SUCI-XXXX. if the string doesn't have text as SUCI then it should give me NO_SUCI as a result.

Ex: if coulmn A has string "Accruals for SUCI-3288_Correction" then it should give me the value as SUCI-32888 & if the string doesn't have word SUCI then it should give me NO-SUCI as a result.

@ChristofSchwarz @ChristofSchwarzdupe @avinashelite @tresesco @MayilVahanan @Anil_Babu_Samineni @sunny_talwar @krishnamraju513 @prabir_c @MarcoWedel 

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

If(WildMatch(requirement_name, '*SUCI*'), Mid(requirement_name,Index(requirement_name, 'SUCI'),9), 'No SUCI') as SUCIFlag

 

Note: Based on your integer length the the number in bold ('9') might change. If you have five-digit number then use 10 instead. And if the length is variable, you have to write a bit more complex expression.

View solution in original post

3 Replies
prabir_c
Partner
Partner

Hi Piyush,

Try wildmatch function like this-

Directory;
LOAD requirement_name,
if(WildMatch(requirement_name,'*SUCI-????*')=1,'SUCI','NO_SUCI') as Req_Type
FROM
[C:\Users\abc\Downloads\1d63dbb0-7ac4-4b21-826b-931692fafc25.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

 

piyush_s11
Creator
Creator
Author

Hi @prabir_c 

Thanks for your reply.

The solution you have provided will only give me SUCI & NO-SUCI however I want SUCI along withe number i.e SUCI-XXXX

Eg: if coulmn A has string "Accruals for SUCI-3288_Correction" then it should give me the value as SUCI-32888 & if the string doesn't have word SUCI then it should give me NO-SUCI as a result.

Thanks

tresesco
MVP
MVP

Try like:

If(WildMatch(requirement_name, '*SUCI*'), Mid(requirement_name,Index(requirement_name, 'SUCI'),9), 'No SUCI') as SUCIFlag

 

Note: Based on your integer length the the number in bold ('9') might change. If you have five-digit number then use 10 instead. And if the length is variable, you have to write a bit more complex expression.

View solution in original post