<?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 Substring tricky in Qlikview? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150242#M28300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the sample you uploaded, there is a hard CRLF at the end of each entry. So you could spilt them like:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;BR /&gt;date(date#(left(History,10),'YYYY-MM-DD')) as Date,&lt;BR /&gt; subfield(mid(History,11),':',1) as Salesman,&lt;BR /&gt; subfield(History, ':', 2) as Activity,&lt;BR /&gt; subfield(History, ':', 3) as Who&lt;BR /&gt;;&lt;BR /&gt;LOAD Type,&lt;BR /&gt; [Key 1],&lt;BR /&gt; [Key 2],&lt;BR /&gt; subfield(History, chr(13) &amp;amp; chr(10)) as History&lt;BR /&gt;FROM&lt;BR /&gt;Book4.xls&lt;BR /&gt;(biff, embedded labels, table is Sheet1$);&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;One entry has "IMPORTED FROM FILE" where the date should be. You'll have to filter these out but I don't know what you want to do for the date.&lt;/P&gt;&lt;P&gt;If there is no CRLFor other entry delimiter in your real data, the only other idea I have would be to use Regular Expressions (VB) to break at the nnnn-nn-nn date pattern.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2009 06:39:21 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2009-07-24T06:39:21Z</dc:date>
    <item>
      <title>Substring tricky in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150238#M28296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to bulid an application where I want to calculate sales activities. These are stored in a quite tricky database. Looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-338_sourceID:338" /&gt;&lt;/P&gt;&lt;P&gt;I want to use Qlikview for 3 things (to start with):&lt;/P&gt;&lt;P&gt;Dates:&lt;BR /&gt;2005-08-24&lt;BR /&gt;etc.....&lt;/P&gt;&lt;P&gt;Salesmen:&lt;BR /&gt;SD:&lt;BR /&gt;DW:&lt;BR /&gt;KMT:&lt;BR /&gt;etc....&lt;/P&gt;&lt;P&gt;Activities:&lt;BR /&gt;- Phonecall (out):&lt;BR /&gt;- Phonecall (in):&lt;BR /&gt;- Sent Quotation:&lt;BR /&gt;etc.....&lt;/P&gt;&lt;P&gt;I think I can use the index function and the substringcount function. Any ideas what the best way of doing this?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 03:11:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150238#M28296</guid>
      <dc:creator />
      <dc:date>2009-07-24T03:11:16Z</dc:date>
    </item>
    <item>
      <title>Substring tricky in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150239#M28297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a small csv file with some data? It would be easire than taking guesses on the delimiters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 03:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150239#M28297</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2009-07-24T03:45:44Z</dc:date>
    </item>
    <item>
      <title>Substring tricky in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150240#M28298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like the length of the date is fixed, with the remainder of the fields being delimited by ":'. Should be pretty easy using subfield to pick out the fields.&lt;/P&gt;&lt;P&gt;date(date#(left(History,10),'YYYY-MM-DD') as Date&lt;BR /&gt;subfield(mid(History,11),':',1) as Salesman&lt;BR /&gt;subfield(History, ':', 2) as Activity&lt;BR /&gt;subfield(History, ':', 3) as Who&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 03:57:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150240#M28298</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-07-24T03:57:17Z</dc:date>
    </item>
    <item>
      <title>Substring tricky in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150241#M28299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I hope it was so easy, but the Database has an awful construction. The Dates can be anywhere in the string, not the first 10 positions. A new date (and activities) can be found in the same string.&lt;/P&gt;&lt;P&gt;I've created an example of this. I've added a new activity as "ADMIN" (As salesman)&lt;BR /&gt;Each Value starts with&lt;/P&gt;&lt;P&gt;Date Salesman: Activity: Contact: TextextexttexttextDate Salesman: Activity: Contact:&lt;/P&gt;&lt;P&gt;Example files attached.&lt;/P&gt;&lt;P&gt;Thanks guys!&lt;/P&gt;&lt;P&gt;[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/3124.Sales.zip:550:0]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 06:08:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150241#M28299</guid>
      <dc:creator />
      <dc:date>2009-07-24T06:08:18Z</dc:date>
    </item>
    <item>
      <title>Substring tricky in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150242#M28300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the sample you uploaded, there is a hard CRLF at the end of each entry. So you could spilt them like:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;BR /&gt;date(date#(left(History,10),'YYYY-MM-DD')) as Date,&lt;BR /&gt; subfield(mid(History,11),':',1) as Salesman,&lt;BR /&gt; subfield(History, ':', 2) as Activity,&lt;BR /&gt; subfield(History, ':', 3) as Who&lt;BR /&gt;;&lt;BR /&gt;LOAD Type,&lt;BR /&gt; [Key 1],&lt;BR /&gt; [Key 2],&lt;BR /&gt; subfield(History, chr(13) &amp;amp; chr(10)) as History&lt;BR /&gt;FROM&lt;BR /&gt;Book4.xls&lt;BR /&gt;(biff, embedded labels, table is Sheet1$);&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;One entry has "IMPORTED FROM FILE" where the date should be. You'll have to filter these out but I don't know what you want to do for the date.&lt;/P&gt;&lt;P&gt;If there is no CRLFor other entry delimiter in your real data, the only other idea I have would be to use Regular Expressions (VB) to break at the nnnn-nn-nn date pattern.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 06:39:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150242#M28300</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-07-24T06:39:21Z</dc:date>
    </item>
    <item>
      <title>Substring tricky in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150243#M28301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look here: &lt;A href="http://community.qlik.com/forums/p/18107/70780.aspx#70780"&gt;http://community.qlik.com/forums/p/18107/70780.aspx#70780&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is discussed previousely and solution was validated. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 07:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150243#M28301</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2009-07-24T07:56:39Z</dc:date>
    </item>
    <item>
      <title>Substring tricky in Qlikview?</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150244#M28302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks for all help.&lt;/P&gt;&lt;P&gt;Solved the calculation with &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Aggr&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;(&lt;B&gt;sum&lt;/B&gt;(&lt;B&gt;substringcount&lt;/B&gt; (&lt;B&gt;Activity&lt;/B&gt;, 'Phonecall')),&lt;B&gt;Salesman&lt;/B&gt;) &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;Tanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 09:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-tricky-in-Qlikview/m-p/150244#M28302</guid>
      <dc:creator />
      <dc:date>2009-07-24T09:45:06Z</dc:date>
    </item>
  </channel>
</rss>

