<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Import/Transform Text File in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364024#M706078</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt; I'm attempting upload a text file and I can't figure out way to transform the data so it comes in correctly. I've attached a sample. Anybody have any ideas form me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2012 15:00:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-23T15:00:53Z</dc:date>
    <item>
      <title>Import/Transform Text File</title>
      <link>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364024#M706078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt; I'm attempting upload a text file and I can't figure out way to transform the data so it comes in correctly. I've attached a sample. Anybody have any ideas form me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 15:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364024#M706078</guid>
      <dc:creator />
      <dc:date>2012-04-23T15:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Transform Text File</title>
      <link>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364025#M706079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can use something along these lines (only some ideas, I made a lot of implicite assumptions):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMP:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD trim(@1) as tmpString, if(not wildmatch(@1,'*$*') and not previous(wildmatch(@1,'*$*')), previous(@1), peek(Header1)) as Header1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(not wildmatch(@1,'*$*'), @1, peek(Header2)) as Header2, if(not wildmatch(@1,'*$*'),1) as isHeader &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C:\Users\Stefan\Downloads\SampleForQlikview.txt&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(txt, codepage is 1252, no labels, delimiter is '\t', header is 17 lines);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RESULT:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD LineNo, Header1, Header2, Product, [Product Description], left(tmpString3,index(tmpString3,'&amp;nbsp; ')) as [Service Category], money#(trim(mid(tmpString3,index(tmpString3,'&amp;nbsp; '))),'$#','.',',') as [Price in USD];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD LineNo, Header1, Header2, Product, left(tmpString2,index(tmpString2,'&amp;nbsp; ')) as [Product Description], trim(mid(tmpString2,index(tmpString2,'&amp;nbsp; '))) as tmpString3;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD recno() as LineNo, Header1, Header2, left(tmpString,index(tmpString,'&amp;nbsp; ')) as Product, trim(mid(tmpString,index(tmpString,'&amp;nbsp; '))) as tmpString2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident TMP where not isHeader=1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table TMP;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMP table just handles the two headers I identified (If you have more then two levels, well, this will already break it). I skipped the first lines, if you need to load in effective date, it should not be too difficult to add this as an additional date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESULT table loads are handling the separation of the different fields, mostly string operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also attached,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 19:59:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364025#M706079</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-04-23T19:59:42Z</dc:date>
    </item>
    <item>
      <title>Import/Transform Text File</title>
      <link>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364026#M706080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&amp;nbsp; This works great. I finally looked at and seems to do everything that I need. Did you use the transformation wizard to complete this? I just didn't know where to start....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 16:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364026#M706080</guid>
      <dc:creator />
      <dc:date>2012-05-31T16:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Import/Transform Text File</title>
      <link>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364027#M706081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, no wizard involved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to parse in a file like that, you need to define the structure of the data, so I started with Header1, Header2 and detail lines. How to distinguish between them etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then try to structure the detail lines (your actual fields) and try to parse them (I used a trim &amp;amp; crop technique).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are several loads involved, if you stop after each load and look at the created table, it should be quite clear how it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 16:53:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364027#M706081</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-31T16:53:44Z</dc:date>
    </item>
    <item>
      <title>Import/Transform Text File</title>
      <link>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364028#M706082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Congratulation !&amp;nbsp; I'm just be back on the QV community aftert 3 month&amp;nbsp; and find out you have overtaken John W in the Top Ranking Member.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jean-Jacques&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 17:03:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Import-Transform-Text-File/m-p/364028#M706082</guid>
      <dc:creator />
      <dc:date>2012-05-31T17:03:55Z</dc:date>
    </item>
  </channel>
</rss>

