<?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: Subfield Challenge in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599969#M444186</link>
    <description>&lt;P&gt;This might work. Check the attached.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2019 14:25:48 GMT</pubDate>
    <dc:creator>neelamsaroha157</dc:creator>
    <dc:date>2019-07-08T14:25:48Z</dc:date>
    <item>
      <title>Subfield Challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599912#M444179</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I have a table with one field with the following structure :&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Purchase-Line&lt;/TD&gt;&lt;TD&gt;Detail Entries&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100-1&lt;/TD&gt;&lt;TD&gt;1:&lt;BR /&gt;Date/Hour: 14/06/2019 15:05&lt;BR /&gt;Terminal:T1&lt;BR /&gt;User: user1@user1.com&lt;BR /&gt;2:&lt;BR /&gt;Date/Hour: 14/06/2019 15:10&lt;BR /&gt;Terminal : T100&lt;BR /&gt;User: user1@user1.com&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which means that the person with the ticket 100-1 has two entries, the first one at 15:10 and the second one at 15:15 the same day.&lt;/P&gt;&lt;P&gt;I'd like to have a final table like this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Purchase-Line&lt;/TD&gt;&lt;TD&gt;Entry&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Hour&lt;/TD&gt;&lt;TD&gt;Terminal&lt;/TD&gt;&lt;TD&gt;User&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100-1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;14/06/2019&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;T1&lt;/TD&gt;&lt;TD&gt;User: user1@user1.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100-1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;14/06/2019&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;T100&lt;/TD&gt;&lt;TD&gt;User: user1@user1.com&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried with subfield() function with the field "Detail entries" but I can't get make it work as I want. Any ideas of how can I do that?&lt;/P&gt;&lt;P&gt;I've attached a sample of my problem in excel.&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 13:16:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599912#M444179</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2019-07-08T13:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield Challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599947#M444183</link>
      <description>&lt;P&gt;Entry would be : subfield([Detail Entries], ':', 1)&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;Hour&amp;nbsp; would be : subfield(subfield([Detail Entries], ':', 3), ' ', 3)&lt;/P&gt;&lt;P&gt;Terminal would be : subfield(subfield([Detail Entries], ':', 5), chr(10), 1)&lt;/P&gt;&lt;P&gt;User would be : subfield([Detail Entries], ':', 6)&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 14:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599947#M444183</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-07-08T14:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield Challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599949#M444184</link>
      <description>&lt;P&gt;Sorry, Date is subfield(subfield([Detail Entries], ':', 3), ' ', 2)&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 14:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599949#M444184</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-07-08T14:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield Challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599950#M444185</link>
      <description>&lt;P&gt;And be sure to use Purchase Line and Entry as dimensions and the others as expressions in your table.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 14:05:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599950#M444185</guid>
      <dc:creator>lockematthewp</dc:creator>
      <dc:date>2019-07-08T14:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield Challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599969#M444186</link>
      <description>&lt;P&gt;This might work. Check the attached.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 14:25:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1599969#M444186</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2019-07-08T14:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield Challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1600165#M444200</link>
      <description>&lt;P&gt;Pleas try the below load script.&amp;nbsp; I am unable to download your Excel file. I tried to mimic mine after your example data set.&lt;/P&gt;&lt;P&gt;// Split each row by the line feed.&lt;/P&gt;&lt;P&gt;[Temp 1]:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD&lt;BR /&gt;[Key] as [Purchase-Line],&lt;BR /&gt;SubField ([Value], Chr (10)) as [Orig Value Temp]&lt;BR /&gt;FROM&lt;BR /&gt;[YOUR EXCEL FILE]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;// Change the ':' in the hour so it is not treated as a delimiter.&lt;/P&gt;&lt;P&gt;[Temp 2]:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;&lt;BR /&gt;If (Left ([Orig Value Temp], 9) = 'Date/Hour',&lt;BR /&gt;Left ([Orig Value Temp], 24) &amp;amp; '~' &amp;amp; Right ([Orig Value Temp], 2),&lt;BR /&gt;[Orig Value Temp]) as [Orig Value],&lt;/P&gt;&lt;P&gt;RowNo () as [Orig RowNo]&lt;BR /&gt;Resident&lt;BR /&gt;[Temp 1]&lt;BR /&gt;Where&lt;BR /&gt;(Len (Trim ([Orig Value Temp])) &amp;gt; 0);&lt;/P&gt;&lt;P&gt;DROP Table [Temp 1];&lt;/P&gt;&lt;P&gt;// Break out each entry into a attribute and value.&lt;BR /&gt;// Calculate a unique group for each set of data.&lt;/P&gt;&lt;P&gt;[Temp 3]:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;&lt;BR /&gt;Ceil ([Orig RowNo], 4) as [Group],&lt;/P&gt;&lt;P&gt;If (IsNum (SubField ([Orig Value], ':', 1)),&lt;BR /&gt;'Entry',&lt;BR /&gt;Trim (SubField ([Orig Value], ':', 1))) as [Attribute],&lt;BR /&gt;&lt;BR /&gt;If (IsNum (SubField ([Orig Value], ':', 1)),&lt;BR /&gt;Trim (SubField ([Orig Value], ':', 1)),&lt;BR /&gt;Trim (SubField ([Orig Value], ':', 2))) as [Value]&lt;BR /&gt;Resident&lt;BR /&gt;[Temp 2]&lt;BR /&gt;Where&lt;BR /&gt;(Len (Trim ([Orig Value])) &amp;gt; 0);&lt;/P&gt;&lt;P&gt;DROP Table [Temp 2];&lt;/P&gt;&lt;P&gt;// Create unique fields for each attribute.&lt;/P&gt;&lt;P&gt;[Temp 4]:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD&lt;BR /&gt;[Purchase-Line] as [Purchase-Line],&lt;BR /&gt;[Orig Value] as [Orig Value],&lt;BR /&gt;[Attribute] as [Attribute],&lt;BR /&gt;[Value] as [Value],&lt;BR /&gt;[Orig RowNo] as [Orig RowNo],&lt;BR /&gt;[Group] as [Group],&lt;BR /&gt;&lt;BR /&gt;If ([Attribute] = 'Entry',&lt;BR /&gt;[Value],&lt;BR /&gt;Null ()) as [Entry],&lt;/P&gt;&lt;P&gt;If ([Attribute] = 'Date/Hour',&lt;BR /&gt;Date (Date# (Replace ([Value], '~', ':'), 'DD/MM/YYYY hh:mm'), 'DD/MM/YYYY'),&lt;BR /&gt;Null ()) as [Date],&lt;/P&gt;&lt;P&gt;If ([Attribute] = 'Date/Hour',&lt;BR /&gt;Time (Date# (Replace ([Value], '~', ':'), 'DD/MM/YYYY hh:mm'), 'hh'),&lt;BR /&gt;Null ()) as [Hour],&lt;/P&gt;&lt;P&gt;If ([Attribute] = 'Terminal',&lt;BR /&gt;[Value],&lt;BR /&gt;Null ()) as [Terminal],&lt;/P&gt;&lt;P&gt;If ([Attribute] = 'User',&lt;BR /&gt;[Value],&lt;BR /&gt;Null ()) as [User]&lt;BR /&gt;Resident&lt;BR /&gt;[Temp 3];&lt;/P&gt;&lt;P&gt;DROP Table [Temp 3];&lt;/P&gt;&lt;P&gt;// Keep the max value for each grouping.&lt;/P&gt;&lt;P&gt;[Temp 5]:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD&lt;BR /&gt;MaxString ([Purchase-Line]) as [Purchase-Line],&lt;BR /&gt;MaxString ([Entry]) as [Entry],&lt;BR /&gt;Max ([Date]) as [Date],&lt;BR /&gt;Max ([Hour]) as [Hour],&lt;BR /&gt;MaxString ([Terminal]) as [Terminal],&lt;BR /&gt;MaxString ([User]) as [User]&lt;BR /&gt;Resident&lt;BR /&gt;[Temp 4]&lt;BR /&gt;Group By&lt;BR /&gt;[Group];&lt;/P&gt;&lt;P&gt;DROP Table [Temp 4];&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 01:47:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1600165#M444200</guid>
      <dc:creator>ehilsinger</dc:creator>
      <dc:date>2019-07-09T01:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield Challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1608150#M444882</link>
      <description>&lt;P&gt;Marcel, did any of the posts help you?&amp;nbsp; If so, please click the Accept as solution button on those that did, or provide some further information.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 15:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-Challenge/m-p/1608150#M444882</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-07-31T15:58:07Z</dc:date>
    </item>
  </channel>
</rss>

