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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to implement Field based string scan and segregate data , key wise ?

Hi All

How to implement Field based string scan and segregate data , key wise ?

Table 1

 

Words_to_be_Scanned
theft
scare
appreciate
fraud
Risk
financial
keen

Table 2

SSNDate_of_VisitCommentCall_Time
12312/12/2017It was an online fraud and my financials are at dire risk2:00 AM
12312/13/2017Beware of smiling villains3:00 AM
12312/14/2017I appreciate welfare steps and keen to see those4:00 AM
12312/15/2017This is not done5:00 AM
12412/16/2017This is a risk and full of blind guesses6:00 AM
12512/17/2017I am having keen desire to held it back7:00 AM
12612/18/2017its not even fraud prima facie8:00 AM
12712/19/2017he did not scare me at all9:00 AM

My requirement is that , every word from first table to be searched in comment field of second table and if found then stored

and plot chart :  number of words from first table used per SSN wise .


Thanks & Regards

Shekar

1 Solution

Accepted Solutions
sunny_talwar

Something like this?

Capture.PNG

Script

MappingTable:

Mapping

LOAD Words_to_be_Scanned,

'/' & Words_to_be_Scanned & '\'

FROM

[..\..\Downloads\scanning.xlsx]

(ooxml, embedded labels, table is Keywords);


Fact:

LOAD SSN,

     Date_of_Visit,

     Comment,

     Call_Time,

     SubField(SubField(Keywords, '\'), '/') as Keywords;

LOAD SSN,

     Date_of_Visit,

     Comment,

     Call_Time,

     MapSubString('MappingTable', Comment) as Keywords

FROM

[..\..\Downloads\scanning.xlsx]

(ooxml, embedded labels, table is Data);


Inner Join (Fact)

LOAD Words_to_be_Scanned as Keywords

FROM

[..\..\Downloads\scanning.xlsx]

(ooxml, embedded labels, table is Keywords);

View solution in original post

3 Replies
sunny_talwar

Something like this?

Capture.PNG

Script

MappingTable:

Mapping

LOAD Words_to_be_Scanned,

'/' & Words_to_be_Scanned & '\'

FROM

[..\..\Downloads\scanning.xlsx]

(ooxml, embedded labels, table is Keywords);


Fact:

LOAD SSN,

     Date_of_Visit,

     Comment,

     Call_Time,

     SubField(SubField(Keywords, '\'), '/') as Keywords;

LOAD SSN,

     Date_of_Visit,

     Comment,

     Call_Time,

     MapSubString('MappingTable', Comment) as Keywords

FROM

[..\..\Downloads\scanning.xlsx]

(ooxml, embedded labels, table is Data);


Inner Join (Fact)

LOAD Words_to_be_Scanned as Keywords

FROM

[..\..\Downloads\scanning.xlsx]

(ooxml, embedded labels, table is Keywords);

shekhar_analyti
Specialist
Specialist
Author

Thank you Sunny Bhai

sunny_talwar

no problem shekar bhai