<?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 Re: Index, Left/Right in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738442#M674679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that's neat too I like it, just need to be careful if you have a large data set as you are inflating with the subfield before reducing so could be quite a resource hungry load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2014 14:22:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-24T14:22:29Z</dc:date>
    <item>
      <title>Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738434#M674671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi all,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;I'm trying to do recover some dates in my script but I don't know What function would best fit with my problem : Left/right, Index?:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Ex :&lt;/P&gt;&lt;P&gt;If 20140302_011 then 20140302&lt;/P&gt;&lt;P&gt;If 39_204140302_011 then 20140302&lt;/P&gt;&lt;P&gt;If 20_2_20120515_001 then 20120515&lt;/P&gt;&lt;P&gt;If TEST_20120703_001 then 20120703&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the only the 4 occurences.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'd be greaful for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 10:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738434#M674671</guid>
      <dc:creator />
      <dc:date>2014-07-24T10:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738435#M674672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there is always the underscore as separator, you can use SPLITFIELD() instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 10:13:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738435#M674672</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-07-24T10:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738436#M674673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;subfield() then filter to fields where len()=8 (assuming this is reliable). Otherwise use Date#() to convert to date and check that is valid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 10:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738436#M674673</guid>
      <dc:creator>juleshartley</dc:creator>
      <dc:date>2014-07-24T10:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738437#M674674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have any Splitfield() function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 11:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738437#M674674</guid>
      <dc:creator />
      <dc:date>2014-07-24T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738438#M674675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry - got confused by the last answer. The function is subfield([Field], '_')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 12:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738438#M674675</guid>
      <dc:creator>juleshartley</dc:creator>
      <dc:date>2014-07-24T12:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738439#M674676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could use subfield() or textbetween() for this, as each of your options are slightly different though, you would need to nest this to give the right output for each. Something like the below should give the right result for each scenario&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Len(Subfield(Date,'_',1))&amp;gt;4, Subfield(Date,'_',1)&lt;/P&gt;&lt;P&gt;,If(Len(Subfield(Date,'_',2))&amp;gt;4, Subfield(Date,'_',2)&lt;/P&gt;&lt;P&gt;,Subfield(Date,'_',3)&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 12:55:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738439#M674676</guid>
      <dc:creator />
      <dc:date>2014-07-24T12:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738440#M674677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, works perfectly fine &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 13:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738440#M674677</guid>
      <dc:creator />
      <dc:date>2014-07-24T13:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738441#M674678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe also helpful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14062110656973258" jivemacro_uid="_14062110656973258"&gt;
&lt;P&gt;LOAD Date#(SubFields, 'YYYYMMDD') as Date&lt;/P&gt;
&lt;P&gt;Where Len(SubFields)=8 and IsNum(SubFields);&lt;/P&gt;
&lt;P&gt;LOAD SubField(DateRaw, '_') as SubFields&lt;/P&gt;
&lt;P&gt;Inline [&lt;/P&gt;
&lt;P&gt;DateRaw&lt;/P&gt;
&lt;P&gt;20140302_011&lt;/P&gt;
&lt;P&gt;39_20140302_011&lt;/P&gt;
&lt;P&gt;20_2_20120515_001&lt;/P&gt;
&lt;P&gt;TEST_20120703_001&lt;/P&gt;
&lt;P&gt;TEST_20120704_001&lt;/P&gt;
&lt;P&gt;TEST_2012070X_001&lt;/P&gt;
&lt;P&gt;TEST_TEST_20130506_001_002&lt;/P&gt;
&lt;P&gt;TEST_TEST_20130507_001_002&lt;/P&gt;
&lt;P&gt;TEST_20130508_001_002&lt;/P&gt;
&lt;P&gt;40_20130509_001_20130510_002&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution generates Dates/Timestamps thus enabling date opertions:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_126922_Pic1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/63066_QlikCommunity_Thread_126922_Pic1.png" /&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 14:14:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738441#M674678</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-07-24T14:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Index, Left/Right</title>
      <link>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738442#M674679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that's neat too I like it, just need to be careful if you have a large data set as you are inflating with the subfield before reducing so could be quite a resource hungry load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 14:22:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Index-Left-Right/m-p/738442#M674679</guid>
      <dc:creator />
      <dc:date>2014-07-24T14:22:29Z</dc:date>
    </item>
  </channel>
</rss>

