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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Mayot
Contributor III
Contributor III

Extract data after detecting particular information in a CSV file

Hello, I have a csv file (~ 40000 lines), at the beginning and at the end of the file I have technical information. I would like to retrieve particular information by detecting data :
"END OF REPORT","Selection Criteria"
,,,,,,,,,
,"Period:","05/2018",
I would like to extract the Period data after the END OF REPORT : "05/2018".

How can I do that ?

EDIT : Maybe I have to use Regex ?

Thanks
Labels (3)
1 Solution

Accepted Solutions
fdenis
Master
Master

after reading data ad tmap with 1 boolean var named endOfCsvFile
first detect "END OF REPORT" to set it as true.
var.endOfCsvFile || row1.col1.equals("END OF REPORT")

filter the output of the tmap (stop sending data when endOfCsvFile is true)

add a new output to outPeriald add filter on this output
to retive row1.col3 only when row1.col2.equals("Periode")

View solution in original post

2 Replies
fdenis
Master
Master

after reading data ad tmap with 1 boolean var named endOfCsvFile
first detect "END OF REPORT" to set it as true.
var.endOfCsvFile || row1.col1.equals("END OF REPORT")

filter the output of the tmap (stop sending data when endOfCsvFile is true)

add a new output to outPeriald add filter on this output
to retive row1.col3 only when row1.col2.equals("Periode")
Mayot
Contributor III
Contributor III
Author

Thanks for your reply. It works fine.