Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
raju_salmon
Creator II
Creator II

Logic help

Hi,

I would need to create a new filed on top of existing one with a logic where it should return only the string which contains FAQ. I have tried using wildmatch, replace etc but did not give the below expected result. In the below example, max FAQ'a in a cell is 2 however in my data, many FAQ strings are available in a single cell with , separated.

Actual FieldExpected Field
ID,BM FAQ,Capture and RouteBM FAQ
ID,BM FAQ,PW Reset,Capture and RouteBM FAQ
ID,CSBG FAQ,Passcode,Capture and RouteCSBG FAQ
ID,CSBG FAQ,Capture and RouteCSBG FAQ
ID,CSBG FAQ,PW Reset,Capture and RouteCSBG FAQ
ID,Alerts,Passcode,BM FAQ,Capture and RouteBM FAQ
ID,Alerts,Passcode,CSBG FAQ,Capture and RouteCSBG FAQ
ID,Alerts,Passcode,PRCTD FAQ,Capture and RoutePRCTD FAQ
ID,Alerts,Passcode,Capture and Route, PRCTD FAQ,Steps FAQPRCTD FAQ,Steps FAQ
ID,Capture,Passcode,Invalid credit alert,PRCTD FAQ,Capture and Route, Steps FAQPRCTD FAQ,Steps FAQ
ID,Capture,Passcode,Valid credit alert,PRCTD FAQ,Steps FAQPRCTD FAQ,Steps FAQ

 

Thanks for you help in advance.

1 Solution

Accepted Solutions
jpenuliar
Partner - Specialist III
Partner - Specialist III

see below:

 


Temp00:
Load * Inline [
Actual Field
'ID,BM FAQ,Capture and Route'
'ID,BM FAQ,PW Reset,Capture and Route'
'ID,CSBG FAQ,Passcode,Capture and Route'
'ID,CSBG FAQ,Capture and Route'
'ID,CSBG FAQ,PW Reset,Capture and Route'
'ID,Alerts,Passcode,BM FAQ,Capture and Route'
'ID,Alerts,Passcode,CSBG FAQ,Capture and Route'
'ID,Alerts,Passcode,PRCTD FAQ,Capture and Route'
'ID,Alerts,Passcode,Capture and Route, PRCTD FAQ,Steps FAQ'
'ID,Capture,Passcode,Invalid credit alert,PRCTD FAQ,Capture and Route, Steps FAQ'
'ID,Capture,Passcode,Valid credit alert,PRCTD FAQ,Steps FAQ'
];

 


Test:
Load
"Actual Field",
Concat("Expected Field",',') as "Expected Field"
Where flg =1
Group by "Actual Field"
;
Load
Rec,
"Actual Field",
"Expected Field",
If(WildMatch("Expected Field",'*FAQ*'),1,0) as flg
;
Load
RecNo() as Rec,
"Actual Field",
Subfield("Actual Field",',') as 'Expected Field'
Resident Temp00
;

 

View solution in original post

2 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

see below:

 


Temp00:
Load * Inline [
Actual Field
'ID,BM FAQ,Capture and Route'
'ID,BM FAQ,PW Reset,Capture and Route'
'ID,CSBG FAQ,Passcode,Capture and Route'
'ID,CSBG FAQ,Capture and Route'
'ID,CSBG FAQ,PW Reset,Capture and Route'
'ID,Alerts,Passcode,BM FAQ,Capture and Route'
'ID,Alerts,Passcode,CSBG FAQ,Capture and Route'
'ID,Alerts,Passcode,PRCTD FAQ,Capture and Route'
'ID,Alerts,Passcode,Capture and Route, PRCTD FAQ,Steps FAQ'
'ID,Capture,Passcode,Invalid credit alert,PRCTD FAQ,Capture and Route, Steps FAQ'
'ID,Capture,Passcode,Valid credit alert,PRCTD FAQ,Steps FAQ'
];

 


Test:
Load
"Actual Field",
Concat("Expected Field",',') as "Expected Field"
Where flg =1
Group by "Actual Field"
;
Load
Rec,
"Actual Field",
"Expected Field",
If(WildMatch("Expected Field",'*FAQ*'),1,0) as flg
;
Load
RecNo() as Rec,
"Actual Field",
Subfield("Actual Field",',') as 'Expected Field'
Resident Temp00
;

 

raju_salmon
Creator II
Creator II
Author

Excellent. Thank you.