Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
SanWWWWW
Contributor
Contributor

Help with finding value in text

Hi,

I need some help with finding values in text. Right now I have table 1, and I want table 2 as result. 

Thnx in advance!

 

Table 1:

idActionActionDescription
123456Question 1<text> 
123458Question 2<text> 
123459Question Follow Up<text> action 123456 <text>
123460Question Closed<text> action 123459 <text> action 123456 <text>
123461Question Closed<text> action 123458 <text> 

 

Table 2:

idActionActionDescriptionQuestion Closed?
123456Question 1<text> Yes - id 123460
123458Question 2<text> Yes - id 123461
123459Question Follow Up<text> action 123456 <text>-
123460Question Closed<text> action 123459 <text> action 123456 <text>-
123461Question Closed<text> action 123458 <text> -
3 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

maybe you could try something like this

 

TABLE:
LOAD *,
KeepChar(If(Index(Action,'Closed')>0,SubField(Description,'<text>',-2)),'1234567890') as idActionClosed
;
....
;

Left Join
LOAD
idActionClosed as idAction,
'Yes - id ' & idAction as [Question Closed?]
Resident TABLE;

SanWWWWW
Contributor
Contributor
Author

 Thank you for your quick response, unfortunately it doenst work..

Maybe my question was wrong. Basically i wanna search, per combination of "action" (just text) and the id of a question (idAction), so "action idAction", in the description of 'Question Closed'. 

And the '<text>' in my tables is actually text, it is not displayed as <text>.

 

StarinieriG
Partner - Specialist
Partner - Specialist

Instead of text what do you have? Spaces?

In that case, probably this could work:

LOAD *,
If(Index(Action,'Closed')>0,Mid(Description,Index(Description,'action',-1)+6)) as idActionClosed